O'Reilly logo

Yii2 By Example by Fabrizio Caldarelli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring user authorization

Yii has two methods to authorize users: ACF and RBAC.

The first one, ACF, is used in applications that require a minimal and simple access control. Basically, its behavior is based on five parameters:

  • allow: This parameter specifies whether this is an allow or deny rule; possible values are allow or deny
  • actions: This parameter specifies which actions this rule matches, and they are declared using an array of string
  • roles: This parameter specifies which user roles this rule matches; possible values are ?' and @, which mean respectively guest user and authenticated user
  • ips: This parameter specifies which client IP address this rule matches; the IP address that can contain * as a wildcard
  • verbs: This parameter specifies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required