Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Is there some way to see/pull a report showing which Roles can view each Category?

DoyceTDoyceT Model Questioner ✭✭✭
edited May 2014 in Vanilla 2.0 - 2.8

I know I can edit a given Category and scroll down to see which roles have access, but in my current situation, that's pretty clunky and prone to missing something.

The situation: I'm running an "online campus" forum for an MFA program in which each user must have a unique role (roughly 60 to 70 roles, in total). This is to give individual-user-level access to all the different classroom and 'office hours' Categories and sub-Categories (about 150 of those, out of which roughly half are archived and replacements created every semester).

So in this case (150 categories and ~75 roles), editing each category to review access is very slow, and the high chance of missing something and giving someone access to see something they really must not see is... troubling. We have legal issues of student privacy to consider.

So if there's some way I could see some kind of table that shows Categories on one axis and Roles on the other, with checks to show who has view access... that'd be pretty great.

I'm not much of a MySQL guy, but I can follow instructions fairly well, if pulling information from the database is the only way to go.


  • Options
    hgtonighthgtonight ∞ · New Moderator

    You can use the following SQL to see which roles can view which categories:

    SELECT r.`Name` as 'Role Name', `Vanilla.Discussions.View` as 'Can View', c.`Name` as 'Category Name'
    FROM `GDN_Permission` AS p 
    JOIN `GDN_Role` as r ON p.`RoleID` = r.`RoleID`
    JOIN `GDN_Category` as c ON p.`JunctionID` = c.`CategoryID`
    WHERE p.`JunctionTable` = 'Category' AND p.`JunctionID` > 0

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    DoyceTDoyceT Model Questioner ✭✭✭

    Excellent. A little cleanup in excel and the registrar can go to work. Thank you!

Sign In or Register to comment.