We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8c10b0ac authored by Evan Prodromou's avatar Evan Prodromou

fine-tuning the privacy flag

parent 06b234c3
This diff is collapsed.
......@@ -120,6 +120,12 @@ class ApiAction extends Action {
# 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)) {
......@@ -36,7 +36,12 @@ if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {
if (!$user && common_config('site', 'private') && !in_array($action, array('login', 'api', 'doc')) {
// If the site is private, and they're not on one of the "public"
// parts of the site, redirect to login
if (!$user && common_config('site', 'private') &&
!in_array($action, array('login', 'openidlogin', 'api', 'doc')))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment