. * * @category API * @package StatusNet * @author Adrian Lang * @author Brenda Wallace * @author Craig Andrews * @author Dan Moore * @author Evan Prodromou * @author mEDI * @author Sarven Capadisli * @author Zach Copley * @copyright 2009 StatusNet, Inc. * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('STATUSNET')) { exit(1); } /** * Actions extending this class will require auth only if a site is private * * @category API * @package StatusNet * @author Adrian Lang * @author Brenda Wallace * @author Craig Andrews * @author Dan Moore * @author Evan Prodromou * @author mEDI * @author Sarven Capadisli * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class ApiPrivateAuthAction extends ApiAuthAction { /** * Does this API resource require authentication? * * @return boolean true or false */ function requiresAuth() { // If the site is "private", all API methods except statusnet/config // need authentication if (common_config('site', 'private')) { return true; } return false; } }