summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-02-18 15:33:52 -0800
committerZach Copley <zach@controlyourself.ca>2009-02-18 15:33:52 -0800
commit28e1c163e3e14b646851d7641c1c8a6a00de8fdc (patch)
tree22b5f433f5b107d45001f658ba7522ae910ed78e /actions
parent6fb3923cef0699a05b336f35505637485f16157e (diff)
Open the /api/laconica/config.format API method so clients can determine whether a site is "private".
Diffstat (limited to 'actions')
-rw-r--r--actions/api.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/actions/api.php b/actions/api.php
index 21fe4eea3..a27d24492 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -131,14 +131,14 @@ class ApiAction extends Action
'statuses/followers',
'favorites/favorites');
- # If the site is "private", all API methods need authentication
-
+ $fullname = "$this->api_action/$this->api_method";
+
+ // If the site is "private", all API methods except laconica/config
+ // need authentication
if (common_config('site', 'private')) {
- return true;
+ return $fullname != 'laconica/config' || false;
}
- $fullname = "$this->api_action/$this->api_method";
-
if (in_array($fullname, $bareauth)) {
# bareauth: only needs auth if without an argument
if ($this->api_arg) {