]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
block subscribes by silenced users
authorEvan Prodromou <evan@status.net>
Mon, 16 Nov 2009 19:12:35 +0000 (14:12 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 16 Nov 2009 19:12:35 +0000 (14:12 -0500)
lib/oauthstore.php
lib/subs.php

index a4ea5ad4d0eccaa1eb9fa65541ab85748a1a2023..b04bcbb8b29896a922ceb651587fccdb7f9d0f1d 100644 (file)
@@ -462,6 +462,10 @@ class StatusNetOAuthDataStore extends OAuthDataStore
         $subscribed = $this->_getAnyProfile($subscribed_user_uri);
         $subscriber = $this->_getAnyProfile($subscriber_uri);
 
+        if (!$subscriber->hasRight(Right::SUBSCRIBE)) {
+            return _('You have been banned from subscribing.');
+        }
+
         $sub->subscribed = $subscribed->id;
         $sub->subscriber = $subscriber->id;
 
index 2f0f970495eb5159dd174635a85a806138793a20..2fc3160dec5e9d01de6a885766706b33587890f0 100644 (file)
@@ -44,6 +44,10 @@ function subs_subscribe_user($user, $other_nickname)
 
 function subs_subscribe_to($user, $other)
 {
+    if (!$user->hasRight(Right::SUBSCRIBE)) {
+        return _('You have been banned from subscribing.');
+    }
+
     if ($user->isSubscribed($other)) {
         return _('Already subscribed!');
     }