From cf051116228875a8dc9e9da193bc7b8bcfe83840 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 4 Jul 2016 22:37:30 -0700 Subject: start to refactor the permission roles --- Zotlabs/Access/PermissionLimits.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Zotlabs/Access/PermissionLimits.php') 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), -- cgit v1.2.3