/** * Check privileges to operation * * @access public * * @param integer $userId user id * @param string $action checked action * @param array $data action params * * @return boolean * @throws \Micro\Base\Exception */ public function check($userId, $action, array $data = []) { return $this->db->exists('rbac_role', ['name' => $action]) ? parent::check($userId, $action, $data) : false; }