Skip to content

Commit

Permalink
Merge pull request #16 from vkuzmov/access-methid-url
Browse files Browse the repository at this point in the history
Fix role access
  • Loading branch information
hkdobrev committed Jun 18, 2014
2 parents a9b0942 + d803ce3 commit a5b234d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/Kohana/Controller/Tart/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public function before()
$access = Auth_Jam::access($this->request->action(), $this->access);
$access_method = 'user_access_by_'.$this->access_method;

if ($this->access_method !== self::ACCESS_METHOD_PERMISSION)
{
$this->access_permission = TRUE;
}

if ($access === 'private' AND $this->access_permission AND ( ! Auth::instance()->logged_in() OR ! Tart::$access_method(Auth::instance()->get_user(), $this->access_permission, $this->request->uri())))
{
if ( ! Auth::instance()->logged_in())
Expand Down

0 comments on commit a5b234d

Please sign in to comment.