aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access/Permissions.php
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-11-04 10:25:27 +0100
committerGitHub <noreply@github.com>2017-11-04 10:25:27 +0100
commitd31df715fb988d5f48a3174646c63542c356fb55 (patch)
tree8ef7bf1e06a5d223228b370121bda97695af7d0e /Zotlabs/Access/Permissions.php
parent39c194c5c32e49f461b8b42a3f4e411a3a5cde3c (diff)
parent26fa091aa2acd1e31db31de4969895372fc4164f (diff)
downloadvolse-hubzilla-d31df715fb988d5f48a3174646c63542c356fb55.tar.gz
volse-hubzilla-d31df715fb988d5f48a3174646c63542c356fb55.tar.bz2
volse-hubzilla-d31df715fb988d5f48a3174646c63542c356fb55.zip
Merge pull request #883 from dawnbreak/docu
:bulb: Improving Doxygen documentation.
Diffstat (limited to 'Zotlabs/Access/Permissions.php')
-rw-r--r--Zotlabs/Access/Permissions.php33
1 files changed, 21 insertions, 12 deletions
diff --git a/Zotlabs/Access/Permissions.php b/Zotlabs/Access/Permissions.php
index 62c4af0ff..20ce21238 100644
--- a/Zotlabs/Access/Permissions.php
+++ b/Zotlabs/Access/Permissions.php
@@ -33,19 +33,22 @@ use Zotlabs\Lib as Zlib;
*/
class Permissions {
+ /**
+ * @brief Permissions version.
+ *
+ * This must match the version in PermissionRoles.php before permission updates can run.
+ *
+ * @return number
+ */
static public function version() {
- // This must match the version in PermissionRoles.php before permission updates can run.
return 2;
}
/**
* @brief Return an array with Permissions.
*
- * @hooks permissions_list
- * * \e array \b permissions
- * * \e string \b filter
- * @param string $filter (optional) only passed to hook permission_list
- * @return Associative array with permissions and short description.
+ * @param string $filter (optional) only passed to hook permissions_list
+ * @return array Associative array with permissions and short description.
*/
static public function Perms($filter = '') {
@@ -74,6 +77,11 @@ class Permissions {
'permissions' => $perms,
'filter' => $filter
];
+ /**
+ * @hooks permissions_list
+ * * \e array \b permissions
+ * * \e string \b filter
+ */
call_hooks('permissions_list', $x);
return($x['permissions']);
@@ -84,9 +92,7 @@ class Permissions {
*
* e.g. you must be authenticated.
*
- * @hooks write_perms
- * * \e array \b permissions
- * @return Associative array with permissions and short description.
+ * @return array Associative array with permissions and short description.
*/
static public function BlockedAnonPerms() {
@@ -99,6 +105,10 @@ class Permissions {
}
$x = ['permissions' => $res];
+ /**
+ * @hooks write_perms
+ * * \e array \b permissions
+ */
call_hooks('write_perms', $x);
return($x['permissions']);
@@ -138,7 +148,7 @@ class Permissions {
* to [ 0 => ['name' => 'view_stream', 'value' => 1], ... ]
*
* @param array $arr associative perms array 'view_stream' => 1
- * @return Indexed array with elements that look like
+ * @return array Indexed array with elements that look like
* * \e string \b name the perm name (e.g. view_stream)
* * \e int \b value the value of the perm (e.g. 1)
*/
@@ -197,11 +207,10 @@ class Permissions {
* @brief
*
* @param int $channel_id A channel id
- * @return associative array
+ * @return array Associative array with
* * \e array \b perms Permission array
* * \e int \b automatic 0 or 1
*/
-
static public function connect_perms($channel_id) {
$my_perms = [];