The permission list in Tiki is stored in the database. To create a new permission requires the same steps as a Database Schema Upgrade.
Essentially, it requires to insert a new row in the users_permissions table. It must be done in both the db/tiki.sql file and in a database patch file.
INSERT INTO `users_permissions` (`permName`, `permDesc`, `level`, `type`, `admin`, `feature_check`) VALUES('tiki_p_wiki_view_source', 'Can view source of wiki pages', 'basic', 'wiki', NULL, 'feature_source');
The relevant fields are:
- The permission name beginning with the tiki_p_ prefix
- A short description of what the permission does
- A group for the permission to be used by quick permission admin. Default available groups are basic, registered, editors and admin.
- The section to which the permission applies. Used by the admin field to grant permission to child permissions.
- If the permission grants rights to all other permissions of the same type.
- Features on which the permission depends. If the features are not enabled, the permission will not be listed in the user interfaces.