aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/restapi/UserPermissions.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-06-30 05:49:46 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-06-30 05:49:46 +0000
commit7fa79f57e5b003ca85ff3a497d49c3ef1bec63f9 (patch)
tree6e84ef0a9e72f256fc1e273bd32fc396485ecd33 /lib/classes/restapi/UserPermissions.php
parent1284afc1159e665910c91ceb6a591a8511ed72de (diff)
fix errors in restapi code (and adjust phpdoc as well), fixes #1227
Closes #1227 Merge request studip/studip!739
Diffstat (limited to 'lib/classes/restapi/UserPermissions.php')
-rw-r--r--lib/classes/restapi/UserPermissions.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/classes/restapi/UserPermissions.php b/lib/classes/restapi/UserPermissions.php
index e22030a..eaaac44 100644
--- a/lib/classes/restapi/UserPermissions.php
+++ b/lib/classes/restapi/UserPermissions.php
@@ -17,7 +17,7 @@ class UserPermissions
* Permissions object will be cached for each user.
*
* @param mixed $user_id Id of user (optional, defaults to global)
- * @return Permissions Returns permissions object
+ * @return UserPermissions Returns permissions object
*/
public static function get($user_id = null)
{
@@ -48,14 +48,12 @@ class UserPermissions
}
/**
- * Defines whether access if allowed for the current user to the
+ * Defines whether access is allowed for the current user to the
* passed route via the passed method.
*
- * @param String $route_id Route template (hash)
- * @param String $method HTTP method
+ * @param String $user_id Id of the user
* @param mixed $granted Granted state (PHP'ish boolean)
- * @param bool $overwrite May values be overwritten
- * @return bool Indicates if value could be changed.
+ * @return UserPermissions Returns instance of self to allow chaining
*/
public function set($user_id, $granted = true)
{
@@ -130,7 +128,7 @@ class UserPermissions
/**
* Get a list of all consumer the user has granted acces to.
*
- * @return Array List of consumer objects
+ * @return array List of consumer objects
*/
public function getConsumers()
{