mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-22 06:09:25 +00:00
Enable disabling of users on Jabber via xmpp
This commit is contained in:
@@ -49,7 +49,7 @@ class JabberService(BaseService):
|
||||
def disable_user(self, uid):
|
||||
""" Disable a user """
|
||||
if self.method == "xmpp":
|
||||
return False
|
||||
return self.jabberadmin.disableuser(uid)
|
||||
else:
|
||||
username, server = uid.split("@")
|
||||
return self.ejctl.ban_user(server, username)
|
||||
@@ -57,7 +57,7 @@ class JabberService(BaseService):
|
||||
def enable_user(self, uid, password):
|
||||
""" Enable a user """
|
||||
if self.method == "xmpp":
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
username, server = uid.split("@")
|
||||
return self.ejctl.enable_user(server, username, password)
|
||||
|
||||
Reference in New Issue
Block a user