diff options
author | friendica <info@friendica.com> | 2013-01-23 21:15:40 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-23 21:15:40 -0800 |
commit | 6e6b268e2523d95624361d29a8bd80b1133aa627 (patch) | |
tree | 95c01140f753fe42f0031064597b12c7dc297835 /include | |
parent | c1a5c88720cf00a041ac4838c4e799ee53933ae9 (diff) | |
download | volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.gz volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.bz2 volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.zip |
auto permissions (such as for forums or whatever) - untested but might just work
Diffstat (limited to 'include')
-rw-r--r-- | include/permissions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/permissions.php b/include/permissions.php index 69f5d75af..ab40a7017 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -86,9 +86,10 @@ function get_all_perms($uid,$observer,$internal_use = true) { if($observer) { if(! $abook_checked) { $x = q("select abook_my_perms, abook_flags from abook - where abook_channel = %d and abook_xchan = '%s' limit 1", + where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1", intval($uid), - dbesc($observer) + dbesc($observer), + intval(ABOOK_FLAG_SELF) ); $abook_checked = true; } @@ -210,9 +211,10 @@ function perm_is_allowed($uid,$observer,$permission) { return false; if($observer) { - $x = q("select abook_my_perms, abook_flags from abook where abook_channel = %d and abook_xchan = '%s' limit 1", + $x = q("select abook_my_perms, abook_flags from abook where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1", intval($uid), - dbesc($observer) + dbesc($observer), + intval(ABOOK_FLAG_SELF) ); // If they're blocked - they can't read or write |