Oihana PHP System

Effect uses ConstantsTrait

Defines the supported effects for Casbin permissions or RBAC rules.

In a policy rule, the effect determines whether a matched permission grants or denies access. Typical usage in Casbin:

[
    'sub' => 'role:admin',
    'dom' => 'project',
    'obj' => '/documents/:id',
    'act' => 'GET|POST',
    'eft' => Effect::ALLOW
]

Effect values:

  • allow — Grants access to the requested resource/action.
  • deny — Explicitly denies access, even if another rule allows it.

Using these constants avoids hardcoding strings and ensures consistency across your RBAC or Casbin implementations.

Tags
category

Security / RBAC

author

Marc Alcaraz (ekameleon)

since
1.0.2

Table of Contents

Constants

ALLOW  = 'allow'
Grants access for the permission or policy.
DENY  = 'deny'
Denies access for the permission or policy.

Constants

ALLOW

Grants access for the permission or policy.

public mixed ALLOW = 'allow'

DENY

Denies access for the permission or policy.

public mixed DENY = 'deny'

        
On this page

Search results