Skip to content

where and how to add rule? #35

@pkjoshisbp

Description

@pkjoshisbp

somewhere in other comments - I saw that
Create your own rule class, for example:

class AboutUsRule extends Rule
{
    public $name = 'aboutUsRule';

    public function execute($user, $item, $params)
    {
        // your code here
    }
}

my question is where do I add these rule. as mention there - class - app\rbac\rules\AboutUsRule // in my example
if I am trying to create a folder rbac in my site root, and then adding rule there, it is showing the directory listing instead of rbac web interface. when I access mysite/rbac.

note:
I am able to add role, permission, assign permission etc. without any issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions