summaryrefslogtreecommitdiffstats
path: root/ipa_server
diff options
context:
space:
mode:
Diffstat (limited to 'ipa_server')
-rw-r--r--ipa_server/servercore.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/ipa_server/servercore.py b/ipa_server/servercore.py
index f0d3dd9aa..a391c5cf9 100644
--- a/ipa_server/servercore.py
+++ b/ipa_server/servercore.py
@@ -134,9 +134,10 @@ def get_entry_by_dn (dn, sattrs=None):
# User support
-def is_user_unique(uid):
- """Return True if the uid is unique in the tree, False otherwise."""
- # FIXME
+def user_exists(uid):
+ """Return True if the exists, False otherwise."""
+ # FIXME: fix the filter
+ # FIXME: should accept a container to look in
# uid = self.__safe_filter(uid)
searchfilter = "(&(uid=%s)(objectclass=posixAccount))" % uid
@@ -292,6 +293,10 @@ def add_entry(entry):
"""Add a new entry"""
return context.conn.getConn().addEntry(entry)
+def delete_entry(dn):
+ """Remove an entry"""
+ return context.conn.getConn().deleteEntry(dn)
+
def uniq_list(x):
"""Return a unique list, preserving order and ignoring case"""
myset = {}