Loading...
 

History: Permission Management

Preview of version: 29

A profile would not be very useful if it could not grant rights appropriately for groups. Profiles allow to create groups and to modify the permissions of existing groups using a unified syntax.

The permissions block is a top level block.

For category permissions: create the categories and assign items to them with the category handler. Then give groups permissions on the categories with the permissions handler.

Example


Group Permissions Example

YAML
permissions: Anonymous: allow: [ export_wiki ] Registered: description: Will be ignored because group is already created allow: [ edit, minor ] deny: [ export_wiki ] Moderators: description: Trusted users watching the recent changes to avoid spam allow: [ rollback ] include: [ Registered ]




Group Permissions and Object Permissions Example

YAML
permissions: Anonymous: allow: [ export_wiki ] Registered: description: Will be ignored because group is already created allow: [ edit, minor ] deny: [ export_wiki ] Moderators: description: Trusted users watching the recent changes to avoid spam allow: [ rollback ] include: [ Registered ] objects: - type: forum id: $moderator_discussion_forum allow: [ forum_post, forum_post_topic, forum_read ]


Dynamic group name examples

The dynamic groups are useful when Data Channels are used to set-up workspaces. Based on user input or object reference, a dynamic group name can be created and used instead of the simple group name.

YAML
mappings: Member: Member ($profileobject:some_ref$) Leader: Leader ($profileobject:some_ref$) permissions: Member: allow: [ view, edit ] Leader: allow: [ view, edit, rollback ]

In the above example, the group respectively named 'Member (ref)' and 'Leader (ref)' will be created if they did not exist (if ref is the input you give in the form)

Permissions can be set to specific objects as long as the ID is known or it was also created by a profile using Object References. The object type does not have to be supported by Tiki Profiles, but a static ID will have to be provided.

Create a group from user input

The example below uses two $profilerequest inputs, one for group name and one for description.

Note: if you have underscore characters in your reference names it will not work (here groupname is good, group_name is not).

YAML
mappings: DummyGroupName: $profilerequest:groupname$Default name$ permissions: DummyGroupName: description: $profilerequest:groupdesc$Default description$ include: [ Registered ] allow: [ search, view_category, wiki_view_attachments, view ]


Group attributes

Unless mentioned otherwise, these attributes only apply on group creation
Field nameMandatoryValue
description Group description
allow List of permissions granted to the group. Permissions are as used in Tiki, except initial tiki_p_ is removed. Applies on existing groups.
deny Negative permissions. Same as allow. Applies on existing groups.
include Group name or list of included groups. Applies even if the group exists. Will replace the current list of included groups.
autojoin When enabled, the user running the profile will automatically join the group.
objects List of objects permissions. (see below)
home URL of the group home.
theme Default theme for members.
user_signup y or n, users can join this group themselves
default_category Category ID.
user_tracker Tracker ID.
group_tracker Tracker ID.
registration_fields List of tracker fields to display in the registration form.


Object permissions

Field nameMandatoryValue
typeyesObject type, as listed on object types
idyesObject ID.
allow Similar to group allow.
deny Similar to group deny








The YAML Camel for permissions.
You can use this spreadsheet" - attatched to this page to create (most of) the YAML markup you need to create a permissions profile. It contained all the tiki perms as of 2008, and allowed assists the creation of a vertical permission stack. (Excel 2007)



History

Advanced
Information Version
Tue 08 of Nov, 2011 23:25 GMT-0000 Marc Laporte In fact, group descriptions do update... 30
Mon 13 of Sep, 2010 22:28 GMT-0000 Marc Laporte cleaner 29
Thu 08 of Apr, 2010 14:34 GMT-0000 idealpragmatist add link to object types. 28
Thu 08 of Apr, 2010 13:22 GMT-0000 idealpragmatist about category perms . . . 27
Tue 06 of Apr, 2010 13:35 GMT-0000 Jonny Bradley 26
Thu 01 of Apr, 2010 05:02 GMT-0000 idealpragmatist 25
Wed 10 of Feb, 2010 18:19 GMT-0000 sylvie 24
Fri 07 of Aug, 2009 02:32 GMT-0000 Marc Laporte typo 23
Thu 06 of Aug, 2009 13:31 GMT-0000 System Administrator 22
Thu 06 of Aug, 2009 10:40 GMT-0000 System Administrator 21
Tue 21 of Apr, 2009 15:45 GMT-0000 Marc Laporte 20
Fri 13 of Mar, 2009 06:30 GMT-0000 Marc Laporte 19
Sun 19 of Oct, 2008 16:11 GMT-0000 Marc Laporte obvious typo but I am not sure the profile works 17
Thu 28 of Aug, 2008 17:21 GMT-0000 idealpragmatist 16
Thu 28 of Aug, 2008 17:16 GMT-0000 idealpragmatist 15
Thu 28 of Aug, 2008 16:42 GMT-0000 idealpragmatist 12
Sat 23 of Aug, 2008 15:44 GMT-0000 Marc Laporte 11
Fri 22 of Aug, 2008 03:07 GMT-0000 idealpragmatist 10
Fri 22 of Aug, 2008 02:04 GMT-0000 idealpragmatist 9
Fri 22 of Aug, 2008 02:02 GMT-0000 idealpragmatist 8
Fri 22 of Aug, 2008 02:00 GMT-0000 idealpragmatist 7
Thu 07 of Aug, 2008 13:22 GMT-0000 System Administrator 6
Mon 04 of Aug, 2008 14:49 GMT-0000 System Administrator 5
Sun 03 of Aug, 2008 11:53 GMT-0000 Marc Laporte tiki_p is not needed 4
Thu 26 of Jun, 2008 19:49 GMT-0000 System Administrator 3
  • «
  • 1 (current)
  • 2