diff --git a/appinfo/info.xml b/appinfo/info.xml index e32120fc688ecbf87a66e4a6dbd852213e67aa18..a22a42fc11ebc934365cd4738d86e57d403fb63e 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -10,7 +10,7 @@ - 9.0.0 + 9.0.1 agpl Murena SAS EcloudAccounts diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index 774e9122a82df02d06ec2764a35e980ce675439d..b8e8c0375ff6dcea9b9b268c2150f66b36125aec 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -12,7 +12,6 @@ use OCA\EcloudAccounts\Exception\AddUsernameToCommonStoreException; use OCA\EcloudAccounts\Exception\LDAPUserCreationException; use OCA\EcloudAccounts\Exception\RecoveryEmailValidationException; use OCA\EcloudAccounts\Service\CaptchaService; -use OCA\EcloudAccounts\Service\FilesystemService; use OCA\EcloudAccounts\Service\HCaptchaService; use OCA\EcloudAccounts\Service\NewsLetterService; use OCA\EcloudAccounts\Service\UserService; @@ -46,7 +45,6 @@ class AccountController extends Controller { private IConfig $config; private IInitialState $initialState; private IAppData $appData; - private FilesystemService $fsService; private const SESSION_VERIFIED_USERNAME = 'verified_username'; private const SESSION_VERIFIED_DISPLAYNAME = 'verified_displayname'; private const CAPTCHA_VERIFIED_CHECK = 'captcha_verified'; @@ -72,7 +70,6 @@ class AccountController extends Controller { ILogger $logger, IInitialState $initialState, IAppData $appData, - FilesystemService $fsService ) { parent::__construct($AppName, $request); $this->appName = $AppName; @@ -89,7 +86,6 @@ class AccountController extends Controller { $this->request = $request; $this->initialState = $initialState; $this->appData = $appData; - $this->fsService = $fsService; } /** @@ -213,8 +209,7 @@ class AccountController extends Controller { $this->session->remove(self::CAPTCHA_VERIFIED_CHECK); $ipAddress = $this->request->getRemoteAddress(); $this->userService->addUsernameToCommonDataStore($username, $ipAddress, $recoveryEmail); - // temporary fix to add user in 'files-enabled' group - $this->fsService->addUserInFilesEnabledGroup($username); + $response->setStatus(200); $response->setData(['success' => true]); diff --git a/lib/Service/FilesystemService.php b/lib/Service/FilesystemService.php deleted file mode 100644 index 3ac7f25b912ce44f46f84c7bd437a3bdc7e3a157..0000000000000000000000000000000000000000 --- a/lib/Service/FilesystemService.php +++ /dev/null @@ -1,61 +0,0 @@ -userManager = $userManager; - $this->config = $config; - $this->logger = $logger; - $this->groupManager = $groupManager; - } - - public function addUserInFilesEnabledGroup($username): bool { - $user = $this->userManager->get($username); - if (!$user) { - return false; - } - - $groupName = $this->config->getSystemValue('files_access_group_name', ''); - if (!$this->groupManager->groupExists($groupName)) { - $this->logger->error("$groupName group not exist."); - return false; - } - - $group = $this->groupManager->get($groupName); - $group->addUser($user); - return true; - } - - public function checkFilesGroupAccess($username): bool { - $groupName = $this->config->getSystemValue('files_access_group_name', ''); - - if (!$this->groupManager->groupExists($groupName)) { - $this->logger->error("$groupName group not exist."); - return false; - } - - if ($this->groupManager->isInGroup($username, $groupName)) { - return true; - } - - return false; - } - -}