mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Added check_uid command for services, defaults to using check_user
This commit is contained in:
@@ -71,7 +71,7 @@ class UpdateServiceGroups():
|
||||
#try:
|
||||
ret = api.update_groups(servacc.service_uid, servacc.user.groups.all())
|
||||
if not ret:
|
||||
if not api.check_user(servacc.service_uid):
|
||||
if not api.check_uid(servacc.service_uid):
|
||||
self._logger.error('%s not setup on %s, deleting ServiceAccount record' % (servacc.service_uid, serv))
|
||||
servacc.delete()
|
||||
#except:
|
||||
|
||||
@@ -39,6 +39,10 @@ class BaseService():
|
||||
""" Check if the username exists """
|
||||
return False
|
||||
|
||||
def check_uid(self, uid):
|
||||
""" Check if a UID exists """
|
||||
return self.check_user(uid)
|
||||
|
||||
def delete_user(self, uid):
|
||||
""" Delete a user by uid """
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user