0
public function getRules()
{
    $resoId = 'Mageants_AdvancedPermissions::catalog_attributes';
    $permission = 'allow';
    $rid = $this->_adminSession->getUser()->getRole()->getData('role_id');
    $resources = $this->_rulesCollectionFactory->create();
    $collection = $resources->addFieldToFilter('role_id', array('eq' => $rid))->addFieldToFilter('resource_id', array('eq' => $resoId))->addFieldToFilter('permission', array('eq' => $permission));
    return $collection;
}
0

All the roles save in

authorization_role table

and depending on role id rules will be set in

authorization_rule table

  • upload image in question @user80581 – Rutvee Sojitra Jun 7 at 6:17
  • it's your local path it not access by globally @user80581 – Rutvee Sojitra Jun 7 at 6:20
  • prnt.sc/nypcna – milan Jun 7 at 6:23
  • Yes this stores in authorization_role and authorization_rule tables which magento2's default tables @user80581 – Rutvee Sojitra Jun 7 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.