From 8c10b0ac4d8f0638260286deb0db0ad08c73911f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 3 Dec 2008 13:34:32 -0500 Subject: fine-tuning the privacy flag darcs-hash:20081203183432-5ed1f-7626661b797f64594f990ee06d9e13b73b265b49.gz --- actions/api.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actions') 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)) { -- cgit v1.2.3-54-g00ecf