Example #1
0
 /**
  * @param PosterInterface $parent
  * @param                 $action
  * @param bool|true       $defaultValue
  *
  * @return bool
  */
 public function authorizeFor(PosterInterface $parent = null, $action, $defaultValue = true)
 {
     if (!$this->_authorize($roleId = null != $parent ? $parent->getRoleId() : KENDO_GUEST_ROLE_ID, $action, $defaultValue)) {
         return false;
     }
     return true;
 }
 /**
  * @return int
  */
 public function getRoleId()
 {
     return null != $this->viewer ? (int) $this->viewer->getRoleId() : KENDO_DEFAULT_ROLE_ID;
 }