summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-16 19:22:22 +0100
committerEvan Prodromou <evan@status.net>2009-11-16 19:22:22 +0100
commitf1efb845e4955f398be3a7e36499474dc67bdade (patch)
treede565738a6743fb4bc016d03dc843365f36c6860 /classes/Notice.php
parentd2145a5b7f3a95dcfa90edb4bcd5e5b3bf66c116 (diff)
don't allow sandboxed users to post public notices
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index fde40240f..1db431f2a 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -203,12 +203,11 @@ class Notice extends Memcached_DataObject
$notice = new Notice();
$notice->profile_id = $profile_id;
- $blacklist = common_config('public', 'blacklist');
$autosource = common_config('public', 'autosource');
- # Blacklisted are non-false, but not 1, either
+ # Sandboxed are non-false, but not 1, either
- if (($blacklist && in_array($profile_id, $blacklist)) ||
+ if (!$user->hasRight(Right::PUBLICNOTICE) ||
($source && $autosource && in_array($source, $autosource))) {
$notice->is_local = Notice::LOCAL_NONPUBLIC;
} else {