summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-17 08:04:14 -0500
committerEvan Prodromou <evan@status.net>2009-11-17 08:04:14 -0500
commitbac2d80c919a78d5cafd57f712872a90cda04847 (patch)
treed2df10a582edc0bf9e043f1c764953a290927678 /classes/Notice.php
parent9a1a83e8ebe5ad39838e6363f1537a1a5232b9cb (diff)
parent6a1afda259c5223449f679a64f932e36df5ebe39 (diff)
Merge branch '0.9.x' into adminpanel
Conflicts: classes/User.php
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 291e6202b..1db431f2a 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -195,22 +195,19 @@ class Notice extends Memcached_DataObject
' take a breather and post again in a few minutes.'));
}
- $banned = common_config('profile', 'banned');
-
- if ( in_array($profile_id, $banned) || in_array($profile->nickname, $banned)) {
- common_log(LOG_WARNING, "Attempted post from banned user: $profile->nickname (user id = $profile_id).");
+ if (!$profile->hasRight(Right::NEWNOTICE)) {
+ common_log(LOG_WARNING, "Attempted post from user disallowed to post: " . $profile->nickname);
throw new ClientException(_('You are banned from posting notices on this site.'));
}
$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 {