aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 72e002ace..e7f50ceeb 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -1,4 +1,4 @@
-<?php
+<?php /** @file */
function get_perms() {
@@ -23,7 +23,7 @@ function get_perms() {
'post_comments' => array('channel_w_comment', intval(PERMS_W_COMMENT), false, t('Can comment on my posts'), ''),
'post_mail' => array('channel_w_mail', intval(PERMS_W_MAIL), false, t('Can send me private mail messages'), ''),
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
- 'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post tags'), t('Advanced - useful for creating group forum channels')),
+ 'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post @mentions'), t('Advanced - useful for creating group forum channels')),
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('Requires compatible chat plugin')),
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my "public" file storage'), ''),
'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my "public" pages'), ''),
@@ -168,6 +168,13 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
$ret[$perm_name] = false;
continue;
}
+
+ // They are in your address book, but haven't been approved
+
+ if($x[0]['abook_flags'] & ABOOK_FLAG_PENDING) {
+ $ret[$perm_name] = false;
+ continue;
+ }
if(($r) && ($r[0][$channel_perm] & PERMS_CONTACTS)) {
@@ -192,6 +199,8 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) {
continue;
}
+
+
$arr = array(
'channel_id' => $uid,
'observer_hash' => $observer_xchan,
@@ -282,6 +291,10 @@ function perm_is_allowed($uid,$observer_xchan,$permission) {
return false;
}
+ if($x[0]['abook_flags'] & ABOOK_FLAG_PENDING) {
+ return false;
+ }
+
if($r[0][$channel_perm] & PERMS_CONTACTS) {
return true;
}