A free and open-source book on ZF3 for beginners

17.3. Default Roles in the Role Demo Sample

Since our Role Demo application is designed to be the base for your own more complex websites, for our Role Demo sample, we will have only the following simple default roles: Administrator and Guest.

You will be able to add more roles via user interface of the website.

We will have the following default permissions:

Table 17.3. Default permissions in the Role Demo website
Permission Name Description
user.manage Manage users (add/edit/delete).
role.manage Manage roles (add/edit/delete).
permission.manage Manage permissions (add/edit/delete).
profile.any.view View any user profile in the system.
profile.own.view View own profile.

The first three permissions will allow Administrator to manage users, roles and permissions via user interface.

The last two permissions (profile.any.view and profile.own.view) are mostly for demonstration of how Rbac works and can in theory be deleted from your own website if you do not have the user profile page.

The profile.any.view allows Administrator to access http://localhost/application/settings/<user_id> page, which is the user profile of a user with the given ID.

The profile.own.view allows Guest to access their own profile page http://localhost/application/settings.

You will be able to create additional permissions via the user interface of the website.