diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2008-12-03 13:34:32 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2008-12-03 13:34:32 -0500 |
commit | 8c10b0ac4d8f0638260286deb0db0ad08c73911f (patch) | |
tree | e1c7200d88994762f0f50b7d625da685cd16a3df /actions/api.php | |
parent | 06b234c3977609aae000c990125a48c46e523b56 (diff) |
fine-tuning the privacy flag
darcs-hash:20081203183432-5ed1f-7626661b797f64594f990ee06d9e13b73b265b49.gz
Diffstat (limited to 'actions/api.php')
-rw-r--r-- | actions/api.php | 6 |
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)) { |