activate/deactivate nextcloud users

This commit is contained in:
Jorge Pastor 2024-01-04 19:10:17 +01:00
parent b06f0d1cd6
commit dcd525c79e
1 changed files with 5 additions and 6 deletions

View File

@ -152,17 +152,16 @@ class NextCloudController(NextCloudAPIMixin, ServiceController):
else: else:
self.update_group(saas) self.update_group(saas)
self.update_quota(saas) self.update_quota(saas)
if saas.is_active:
self.enable_user(saas)
else:
self.disable_user(saas)
def remove(self, saas, server): def remove(self, saas, server):
self.api_delete('users/%s' % saas.name) self.api_delete('users/%s' % saas.name)
def save(self, saas): def save(self, saas):
self.append(self.update_or_create, saas) self.append(self.update_or_create, saas)
if saas.is_active:
self.enable_user(saas)
else:
self.disable_user(saas)
def delete(self, saas): def delete(self, saas):
self.append(self.remove, saas) self.append(self.remove, saas)