1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Create Categories, Forums and set Permissions

Discussion in 'XenForo Development Discussions' started by ajnos, Mar 14, 2011.

  1. ajnos

    ajnos Member

    We want to create automatic a new category and create 3 new forums inside.
    This should be no problem with the datawriters, but how can we set automatic the permission?

    1. create the category with XenForo_DataWriter_Category
    2. crate the forums with XenForo_DataWriter_Forum

    but what then?
  2. Shadab

    Shadab Well-Known Member

    Use the permission model: XenForo_Model_Permission.

    Setting node permissions for a usergroup:
    Setting node permissions for a single user:
    The permissions array should be in this format:
    	[permission_id_1] => [value]
    	[permission_id_2] => [value]
    	[permission_id_3] => [value]
    	[permission_id_4] => [value]
    where value is one of these strings:
    • 'unset'
    • 'content_allow'
    • 'reset'
    • 'deny'
    • '0' (integer permission: inherit)
    • '-1' (integer permission: unlimited)
    • Any other positive integer value, if it's an integer permission

    • XenForo_ControllerAdmin_Permission_Node::actionUserGroupSave()
    • XenForo_ControllerAdmin_Permission_Node::actionUserSave()
    ajnos likes this.

Share This Page