From 67c9acbc94c5399f27cdf801d2492a7fe71af6b0 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 2 Jan 2011 13:39:48 -0500 Subject: [PATCH] Adding a doc block. --- .../components/auth/controller_authorize.php | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/cake/libs/controller/components/auth/controller_authorize.php b/cake/libs/controller/components/auth/controller_authorize.php index ed78ac5bd..eea082111 100644 --- a/cake/libs/controller/components/auth/controller_authorize.php +++ b/cake/libs/controller/components/auth/controller_authorize.php @@ -1,6 +1,38 @@ request->params['admin'])) { + * return $user['role'] == 'admin'; + * } + * return !empty($user); + * } + * }}} + * + * the above is simple implementation that would only authorize users of the 'admin' role to access + * admin routing. + * + * @package cake.libs.controller.components.auth + * @since 2.0 + * @see AuthComponent::$authenticate + */ class ControllerAuthorize { /** * Controller for the request.