From dcd525c79eb2031fa379259b995e50b92ef7a930 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Thu, 4 Jan 2024 19:10:17 +0100 Subject: [PATCH] activate/deactivate nextcloud users --- orchestra/contrib/saas/backends/nextcloud.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/orchestra/contrib/saas/backends/nextcloud.py b/orchestra/contrib/saas/backends/nextcloud.py index 730f3962..d9eb536f 100644 --- a/orchestra/contrib/saas/backends/nextcloud.py +++ b/orchestra/contrib/saas/backends/nextcloud.py @@ -152,17 +152,16 @@ class NextCloudController(NextCloudAPIMixin, ServiceController): else: self.update_group(saas) self.update_quota(saas) - - def remove(self, saas, server): - self.api_delete('users/%s' % saas.name) - - def save(self, saas): - self.append(self.update_or_create, saas) if saas.is_active: self.enable_user(saas) else: self.disable_user(saas) + def remove(self, saas, server): + self.api_delete('users/%s' % saas.name) + + def save(self, saas): + self.append(self.update_or_create, saas) def delete(self, saas): self.append(self.remove, saas)