aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/permissions.php b/include/permissions.php
index e74486a06..e3578b311 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -278,5 +278,15 @@ function perm_is_allowed($uid,$observer,$permission) {
}
-
+// Check a simple array of observers against a permissions
+// return a simple array of those with permission
+
+function check_list_permissions($uid,$arr,$perm) {
+ $result = array();
+ if($arr)
+ foreach($arr as $x)
+ if($perm_is_allowed($uid,$x,$perm))
+ $result[] = $x;
+ return($result);
+}