API: Default to user authentication level

This commit is contained in:
Tom Needham 2012-09-13 14:15:04 +00:00
parent b261c980c7
commit 8b409dfe2a

View file

@ -33,9 +33,10 @@ class API {
* @param string $url the url to match
* @param callable $action the function to run
* @param string $app the id of the app registering the call
* @param int $authlevel the level of authentication required for the call (See OC_API constants)
*/
public static function register($method, $url, $action, $app){
\OC_API::register($method, $url, $action, $app);
public static function register($method, $url, $action, $app, $authlevel = OC_API::USER_AUTH){
\OC_API::register($method, $url, $action, $app, $authlevel);
}
}