diff options
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/appframework/iappcontainer.php | 1 | ||||
-rw-r--r-- | lib/public/igroupmanager.php | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/public/appframework/iappcontainer.php b/lib/public/appframework/iappcontainer.php index 2270b17c5b7..cb75bf4026c 100644 --- a/lib/public/appframework/iappcontainer.php +++ b/lib/public/appframework/iappcontainer.php @@ -63,6 +63,7 @@ interface IAppContainer extends IContainer { function isLoggedIn(); /** + * @deprecated use IGroupManager->isAdmin($userId) * @return boolean * @deprecated use the groupmanager instead to find out if the user is in * the admin group diff --git a/lib/public/igroupmanager.php b/lib/public/igroupmanager.php index dc69044c490..8f468574c6b 100644 --- a/lib/public/igroupmanager.php +++ b/lib/public/igroupmanager.php @@ -80,4 +80,19 @@ interface IGroupManager { * @return array an array of display names (value) and user ids (key) */ public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0); + + /** + * Checks if a userId is in the admin group + * @param string $userId + * @return bool if admin + */ + public function isAdmin($userId); + + /** + * Checks if a userId is in a group + * @param string $userId + * @param group $group + * @return bool if in group + */ + public function isInGroup($userId, $group); } |