aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access/PermissionLimits.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-04 22:37:30 -0700
committerredmatrix <git@macgirvin.com>2016-07-04 22:37:30 -0700
commitcf051116228875a8dc9e9da193bc7b8bcfe83840 (patch)
tree6317028068d5e5b5770f7929353de9d181431a99 /Zotlabs/Access/PermissionLimits.php
parente6224898d29b605da6751b6744f0e544250b600a (diff)
downloadvolse-hubzilla-cf051116228875a8dc9e9da193bc7b8bcfe83840.tar.gz
volse-hubzilla-cf051116228875a8dc9e9da193bc7b8bcfe83840.tar.bz2
volse-hubzilla-cf051116228875a8dc9e9da193bc7b8bcfe83840.zip
start to refactor the permission roles
Diffstat (limited to 'Zotlabs/Access/PermissionLimits.php')
-rw-r--r--Zotlabs/Access/PermissionLimits.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php
index 907adaae2..ef254c3cf 100644
--- a/Zotlabs/Access/PermissionLimits.php
+++ b/Zotlabs/Access/PermissionLimits.php
@@ -3,6 +3,19 @@
namespace Zotlabs\Access;
class PermissionLimits {
+
+ static public function Std_Limits() {
+ $perms = Permissions::Perms();
+ $limits = array();
+ foreach($perms as $k => $v) {
+ if(strstr($k,'view'))
+ $limits[$k] = PERMS_PUBLIC;
+ else
+ $limits[$k] = PERMS_SPECIFIC;
+ }
+ return $limits;
+ }
+
static public function Set($channel_id,$perm,$perm_limit) {
$r = q("select * from perm_limits where channel_id = %d and perm = '%s' limit 1",
intval($channel_id),