Permalink
Browse files

Fixing bugs

  • Loading branch information...
1 parent 298018f commit dd9d8710872da3fcf3b44c198fec46b72175ccc9 @jeremeamia committed Aug 22, 2011
Showing with 7 additions and 3 deletions.
  1. +4 −2 classes/synapse/acl.php
  2. +2 −0 classes/synapse/acl/rule.php
  3. +1 −1 config/acl.php
View
@@ -92,7 +92,7 @@ public function is_authorized(Model_ACL_User $user, $params = NULL)
* @throws HTTP_Exception_401 if user is not authorized
* @param Model_ACL_User The user to authorize
* @param ACL_Request The request to authorize the user for
- * @return void
+ * @return ACL
*/
public function assert_authorized(Model_ACL_User $user, $params)
{
@@ -116,8 +116,10 @@ public function assert_authorized(Model_ACL_User $user, $params)
}
// Throw a 401 exception (if the callback has altered program flow
- throw new HTTP_Exception_401;
+ throw new HTTP_Exception_401('The current user is not authorized to access the requested URL.');
}
+
+ return $this;
}
protected function _prepare_params($input = NULL)
@@ -390,6 +390,8 @@ public function applies_to_request(array $params)
// Make sure the action matches
if ($this->_action AND Arr::get($params, 'action') != $this->_action)
return FALSE;
+
+ return TRUE;
}
/**
View
@@ -34,7 +34,7 @@
* access to certain actions.
*/
'rules' => array(
- array(
+ 'welcome' => array(
'for' => array('controller' => 'welcome'),
'allow' => array('all' => TRUE),
),

0 comments on commit dd9d871

Please sign in to comment.