From b771a8bb2124d4e48df2e3d3d3078c4de1da3483 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 25 Nov 2009 22:10:55 +0000 Subject: Fix regression in remote subscription; added hasRole() shadow method on Remote_profile. DB_DataObject hides errors by silently returning null for any non-existent method call, making it harder to tell what the heck's going on... the rights check for blocked remote users returned null for the check for subscribe rights, thus eval'ing to false. We now log a note in this circumstance, which would have cut about 3 hours off of the debug time. --- lib/oauthstore.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/oauthstore.php b/lib/oauthstore.php index b04bcbb8b..e34bf8a5e 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -463,6 +463,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore $subscriber = $this->_getAnyProfile($subscriber_uri); if (!$subscriber->hasRight(Right::SUBSCRIBE)) { + common_log(LOG_INFO, __METHOD__ . ": remote subscriber banned ($subscriber_uri subbing to $subscribed_user_uri)"); return _('You have been banned from subscribing.'); } -- cgit v1.2.3-54-g00ecf