Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Multi Roles 1.0

edited September 2008 in Vanilla 1.0 Help
Multi Roles allows you to assign multiple roles to your user accounts. Activated permissions in the selected roles will overrule non-activated permissions.

ISSUES:
- This extension should be the *FIRST* extension which will be loaded! Edit your conf/extensions.php file
- You can\'t change/add multiple roles for yourself


Download: Multi Roles

«1

Comments

  • Looks very interesting indeed!
  • Cool stuff. I wonder if there's a way to work round that necessary file edit..hmm...
  • MarkMark Vanilla Staff
    That is awesome. Nice work!
  • Cool stuff. I wonder if there's a way to work round that necessary file edit..hmm..
    I think you could just disable all the other extensions, then enable them all again making sure this one is activated first.
  • SirNot is right :)
  • Yeah i just meant generally speaking if there was a way for the extension to move itself to the top of the list..
  • Nice, thanx!
  • I get the error "Could not save Multi Roles settings to configuration file!" what does this mean?
  • When you enable the extension, it creates a database table and then write the extension version to the conf/settings.php file. Probably this file isn't writeable.
  • edited September 2006
    Could you elaborate? what files should have what permissions? my settings.php is 0777
  • edited September 2006
    The extension works fine, except that an admin cannot have multiple roles. I can add them manualy in the database, but the webinterface does not change the roles. I do not get an error message.

    Note to self: read first, talk later. Anyway's the thingie works fine :)
  • How would you use multiple roles?
  • Multiple roles can be used for complex permission architectures.

    For example:

    I use my forum for a World of Warcraft community. Every one has different roles: we have normal members, we have class leaders, officers and an administrator. The game has classes like rogues, mages, priests, warriors, hunters, etc. My members are all assigned to a class-role. This way rogue players can see rogue discussions, warrior players can see warrior discussions, etc. As there are 8 classes, I have created 8 roles. Now comes to tricky part: the class leaders and officers have different permissions than normal members, but they should also be assigned to a class role in order to see their class discussions. Normally I would have to make another 8 roles for the class leaders and another 8 roles for officers. But with Multi Roles I can create the extra permissions a class leader needs and assign it to him or her without having to remove the default class-role. And officers are allowed to approve applicants, so they have another role assigned to them.

    It's a complex story, but I hope it makes sense :P
  • Hello Jazzman, if you get a minute could you help me out? Like I said above my settings.php is 777 but I am still getting the "Could not save Multi Roles settings to configuration file!" error. Thanks!
  • If your installation went correctly (table got installed), but it couldn't save the settings somehow, you can manually edit the conf/settings.php. Just add the following:
    $Configuration['MULTIROLES_VERSION'] = '1.0';
  • That did the trick! thanks!
  • Having a bit of a problem with Multi-Roles - I'm still fairly new to using Vanilla, so it might just be that I'm missing something obvious... I need to have a number of categories, each with a different subset of my overall members allowed to view those categories, create discussions in those categories and comment in those discussions. These subsets have quite a lot of overlap. What I've done is to create each category and make it accessible to only its own roles, and to then use multi-roles to apply all relevant roles to each member. What seems to be happening, however, is that only the main role seems to actually be having any effect. In detail: I have a standard "Member" role which is my base "I can get at the common categories" role. I have a custom "Game A" role which is for people who are involved in game A. I have a custom "Game B" role which is for people who are involved in game B. I then have some common categories, a category for game A and a category for game B. I have some users who are not involved in either game... (M) I would like these members to have access only to the common categories, so they have the "Member" role. I have some users who are involved in game A only... (MA) I would like these members to have access to the common categories and the "Game A" category, so they have the "Member" & "Game A" roles. I have some users who are involved in game B only... (MB) I would like these members to have access to the common categories and the "Game B" category, so they have the "Member" & "Game B" roles. I have some users who are involved in game A and Game B... (MAB) I would like these members to have access to the common categories and the "Game A" and "Game B" categories, so they have the "Member", "Game A" & "Game B" roles. However, what seems to happen is that my MAs can only access the "Game A" category when they have "Game A" as their main role. If they don't, then they can't see it. Likewise for MBs and "Game B". My MABs can only get at the game categories if they set their main role to the appropriate one for that specific category. Any clues?
  • I havn't look at the code, It is just a guess...

    I think that multi roles give the users all the permissions given by the differents roles they have
    But that the categories doesn't look at user permissions, but look at their (main) role.
  • Aarghh... so it seems that a member can only access categories on its "main role"? I just redid all my roles + category permissions in the hope that I would be able to better control which categories different users can access (through giving them multiple roles). I think this really is a main point of roles - to select which categories people can access! A warning note would be good to stop people making the same mistake I did - or (much better!) improve the extension so that categories also recognise multiple roles.
  • I agree Thomas... that's the point of multi roles... I'll look into it why it's not working or what's missing. Stay tuned (finishing my theme first for the contest :P)
This discussion has been closed.