summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-12-03 13:34:32 -0500
committerEvan Prodromou <evan@controlyourself.ca>2008-12-03 13:34:32 -0500
commit8c10b0ac4d8f0638260286deb0db0ad08c73911f (patch)
treee1c7200d88994762f0f50b7d625da685cd16a3df /actions
parent06b234c3977609aae000c990125a48c46e523b56 (diff)
fine-tuning the privacy flag
darcs-hash:20081203183432-5ed1f-7626661b797f64594f990ee06d9e13b73b265b49.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/api.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/api.php b/actions/api.php
index b36d644e6..ff46e62e7 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -120,6 +120,12 @@ class ApiAction extends Action {
'statuses/followers',
'favorites/favorites');
+ # If the site is "private", all API methods need authentication
+
+ if (common_config('site', 'private')) {
+ return true;
+ }
+
$fullname = "$this->api_action/$this->api_method";
if (in_array($fullname, $bareauth)) {