summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
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)) {