Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/groupfolders.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-29 17:26:34 +0300
committerBaptiste Fotia <fotia.baptiste@hotmail.com>2022-09-19 17:18:23 +0300
commitf318f2a98970c85d6c90a82a3e9773e334296e64 (patch)
tree53dba97c495f539280a94f71d3608eaab3b46937 /lib/Service/DelegationService.php
parentef89136ccbddbc36309ce99f4f2eb73c71526f44 (diff)
Fix rebasing issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
Diffstat (limited to 'lib/Service/DelegationService.php')
-rw-r--r--lib/Service/DelegationService.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Service/DelegationService.php b/lib/Service/DelegationService.php
index 568b2bb9..dbaa1c9e 100644
--- a/lib/Service/DelegationService.php
+++ b/lib/Service/DelegationService.php
@@ -37,8 +37,8 @@ class DelegationService {
private $userSession;
public function __construct(IConfig $config,
- IGroupManager $groupManager,
- IUserSession $userSession) {
+ IGroupManager $groupManager,
+ IUserSession $userSession) {
$this->config = $config;
$this->groupManager = $groupManager;
$this->userSession = $userSession;
@@ -56,7 +56,7 @@ class DelegationService {
}
$allowedGroups = json_decode($this->config->getAppValue('groupfolders', 'delegated-admins', '[]'));
$userGroups = $this->groupManager->getUserGroups($this->userSession->getUser());
- foreach($userGroups as $userGroup) {
+ foreach ($userGroups as $userGroup) {
if (in_array($userGroup->getGID(), $allowedGroups)) {
return true;
}
@@ -71,7 +71,7 @@ class DelegationService {
public function isSubAdmin() {
$allowedGroups = json_decode($this->config->getAppValue('groupfolders', 'delegated-sub-admins', '[]'));
$userGroups = $this->groupManager->getUserGroups($this->userSession->getUser());
- foreach($userGroups as $userGroup) {
+ foreach ($userGroups as $userGroup) {
if (in_array($userGroup->getGID(), $allowedGroups)) {
return true;
}
@@ -86,6 +86,4 @@ class DelegationService {
public function isAdminOrSubAdmin() {
return $this->isAdmin() || $this->isSubAdmin();
}
-
}
-