diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2017-11-02 20:19:03 -0200 |
---|---|---|
committer | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2017-11-03 11:42:59 -0200 |
commit | fa565750d1f94f9d3f7e2229e7ec7aadd0d06063 (patch) | |
tree | 253341362a6379131828ca97c64f52e09597bd77 /apps/user_ldap/lib/Group_LDAP.php | |
parent | 10ca793452e75ecd276589f8ad916f3090ecb441 (diff) | |
download | nextcloud-server-fa565750d1f94f9d3f7e2229e7ec7aadd0d06063.tar.gz nextcloud-server-fa565750d1f94f9d3f7e2229e7ec7aadd0d06063.zip |
User_LDAP plugins: smaller fixes
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Diffstat (limited to 'apps/user_ldap/lib/Group_LDAP.php')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 39519cc462a..09303276c26 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -39,7 +39,7 @@ namespace OCA\User_LDAP; use OC\Cache\CappedMemoryCache; -use OC\Group\Backend; +use OCP\GroupInterface; class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLDAP { protected $enabled = false; @@ -865,7 +865,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @return int|bool */ public function countUsersInGroup($gid, $search = '') { - if ($this->groupPluginManager->implementsActions(Backend::COUNT_USERS)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::COUNT_USERS)) { return $this->groupPluginManager->countUsersInGroup($gid, $search); } @@ -1076,10 +1076,10 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @return boolean * * Returns the supported actions as int to be - * compared with \OC\Group\Backend::CREATE_GROUP etc. + * compared with GroupInterface::CREATE_GROUP etc. */ public function implementsActions($actions) { - return (bool)((\OC\Group\Backend::COUNT_USERS | + return (bool)((GroupInterface::COUNT_USERS | $this->groupPluginManager->getImplementedActions()) & $actions); } @@ -1098,7 +1098,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @throws \Exception */ public function createGroup($gid) { - if ($this->groupPluginManager->implementsActions(Backend::CREATE_GROUP)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::CREATE_GROUP)) { if ($dn = $this->groupPluginManager->createGroup($gid)) { //updates group mapping $this->access->dn2ocname($dn, $gid, false); @@ -1116,7 +1116,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @throws \Exception */ public function deleteGroup($gid) { - if ($this->groupPluginManager->implementsActions(Backend::DELETE_GROUP)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::DELETE_GROUP)) { if ($ret = $this->groupPluginManager->deleteGroup($gid)) { #delete group in nextcloud internal db $this->access->getGroupMapper()->unmap($gid); @@ -1135,9 +1135,9 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @throws \Exception */ public function addToGroup($uid, $gid) { - if ($this->groupPluginManager->implementsActions(Backend::ADD_TO_GROUP)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::ADD_TO_GROUP)) { if ($ret = $this->groupPluginManager->addToGroup($uid, $gid)) { - #$this->access->connection->clearCache(); + $this->access->connection->clearCache(); } return $ret; } @@ -1152,9 +1152,9 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @throws \Exception */ public function removeFromGroup($uid, $gid) { - if ($this->groupPluginManager->implementsActions(Backend::REMOVE_FROM_GROUP)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::REMOVE_FROM_GROUP)) { if ($ret = $this->groupPluginManager->removeFromGroup($uid, $gid)) { - #$this->access->connection->clearCache(); + $this->access->connection->clearCache(); } return $ret; } @@ -1168,7 +1168,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD * @throws \Exception */ public function getGroupDetails($gid) { - if ($this->groupPluginManager->implementsActions(Backend::GROUP_DETAILS)) { + if ($this->groupPluginManager->implementsActions(GroupInterface::GROUP_DETAILS)) { return $this->groupPluginManager->getGroupDetails($gid); } throw new \Exception('Could not get group details in LDAP backend.'); |