From b6bec681e12e311a7c90ce5a5f015a8597ef38e1 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 21 Jan 2011 00:46:31 +0000 Subject: [PATCH] Remove all groups on disable --- sso/services/ts3/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sso/services/ts3/__init__.py b/sso/services/ts3/__init__.py index 4d5f31f..3152d32 100644 --- a/sso/services/ts3/__init__.py +++ b/sso/services/ts3/__init__.py @@ -74,7 +74,13 @@ class TS3Service(BaseService): if user: ret = self.conn.send_command('servergroupdelclient', {'sgid': self.settings['authed_sgid'], 'cldbid': user }) if ret == '0': + + groups = self._user_group_list(user) + for group in groups: + self.conn.send_command('servergroupdelclient', {'sgid': groups[group], 'cldbid': user }) + return True + return False def enable_user(self, uid, password): """ Enable a user by uid """