From d33f6b9af6bf4bb33e24280f93645d842f8000e2 Mon Sep 17 00:00:00 2001
From: Tom Needham <tom@owncloud.com>
Date: Sat, 27 Apr 2013 17:45:23 +0100
Subject: [PATCH] Use correct variable when checking auth

---
 lib/api.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/api.php b/lib/api.php
index 8d6bbb7cc0..be30894b75 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -89,7 +89,7 @@ class OC_API {
 		$responses = array();
 		foreach(self::$actions[$name] as $action) {
 			// Check authentication and availability
-			if(!self::isAuthorised(self::$actions[$name])) {
+			if(!self::isAuthorised($action)) {
 				$responses[] = array(
 					'app' => $action['app'],
 					'response' => new OC_OCS_Result(null, OC_API::RESPOND_UNAUTHORISED, 'Unauthorised'),
-- 
GitLab