#1 November 12, 2014 12:39pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Module Advanced Permissions

I'm having a problem setting up one of my modules with advanced permissions. Basically, I'm creating an events calendar module and wanting to structure it so that a user can only edit events that belong to a specific group which they have permission to (an event is assigned to a group when it is added). I have two tables: events_calendar and events_calendar_groups. In events_calendar each event has an id and a group_id, the id references the specific event and the group id references the id of the corresponding group that it belongs to in events_calendar_groups. In the events_calendar_groups table I just have the id and the name of the group.

I setup my advanced permissions with the Main Table being events_calendar and the Main Field being events_group_id. The Other Table is events_calendar_groups and the Title Field is group_name. When I go to edit a user it does look correct, I see a list of all my calendar groups and can assign permissions to each individual one. However, when I click Save, all the module permissions for that user are reset back to No Access and on the user's screen it says they now have access to no modules. If you go back in to edit the user, you see every permission reset back to No Access including the ones for the event calendar. I'm fairly confident it has something to do with this setup and is not a bug in BigTree because I have other modules with advanced permissions that work fine.

Can you see anything that I might be doing wrong or is there a better way to structure (either in the CMS or the database) my module in order to get my desired result.

Thanks for your help.

Offline

#2 November 13, 2014 10:35am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Module Advanced Permissions

That is really strange, everything you're describing about your setup sounds like how I would do it. I'm very curious about why it's not saving, though.

Are you saying that if the user has any group based permissions for your events module it wipes out his Module permissions across the board or that it's just the events module permissions that wipe?

Offline

#3 November 13, 2014 11:35am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Module Advanced Permissions

If I have my advanced permissions setup the way I described on my event module and I try to add/update any module permissions on a user, the permissions for all modules, for that user, are set back to No Access, regardless of what they were when I clicked Save. If I turn off advanced permissions for the events module, then all advanced permissions  can be added/updated normally.

Offline

#4 November 13, 2014 11:37am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Module Advanced Permissions

Definitely seems like a bug -- any way you can send me your bigtree_modules SQL dump (including content)? Are you running 4.1.3? Thanks!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.