You are not logged in.
Pages: 1
This could be a problem with my specific setup but if it is I cannot figure out why so I wanted to see if it could be recreated and is indeed a legitimate bug. I am using the Events extension and am having a problem with it not recognizing user permissions correctly. I went in and added a column "group" to the events table so that each event could be assigned to a group. I also have a second table "event_groups" that has a FK relationship to the associated events column and also holds the title for each group. My GBP setup is "Main Table" is "btx_events_events" with the "Main Field" of "group". For the "Other Table" I have it set to my "event_groups" table with the "Title Field" being "group_name". This creates the user permissions setup that I desire, where I can assign a particular user as a publisher/editor for x number of unique groups. Then, when they are adding/editing an event, they only see events within the group(s) they have been assigned to and only those groups appear in the field dropdown when creating a new one. Where the problem occurs is even when all the groups they are assigned to are set at the "Publisher" level, the permissions still come back as only editor which only displays the "Save" button and not "Save & Publish". I looked into it a little bit and my $bigtree["access_level"] is actually returning blank because (I assume) in the getAccessLevel function there is no entry in the user's permissions ($admin->Permissions) under the key for my module. However, there is a key of my module's id under "module_gbp" and the sub-array does contain all the correct information (keys representing event group ids and values of "p") but the function never gets that far and instead returns the empty/null string found from $permissions["module"][$id];. I do understand that I don't have a permissions entry for "modules" because I have it checked as "No Access" at the top level (so for the whole "Events" module). But I don't want to set that as either "Publisher" or "Editor" because that would open up all the groups to my users and basically ignore/override my GBP.
After having thought about it, I'm not sure what the expected behavior would be if, for example, I marked a user as "Editor" for x groups and "Publisher" for y groups. I haven't spent any time looking at the processing to understand how it would behave if a user were to click a "Save & Publish" button for a record that they were technically only an editor of.
Hopefully this all makes sense. I realize I might be trying to do something that was not originally intended and if that's the case, any help/thoughts on how to try and accomplish what I'm after would be greatly appreciated.
Offline
There does seem to be a bug, hopefully I'll get this fixed tonight or tomorrow. The "Save & Publish" button should appear/disappear depending on whether the selected group is one that is publishable.
Offline
Ok, actually it looks like I was being dumb and had my user set to be a publisher of the whole module. I setup a similar permissions system as you for the Events extension and it properly switched the Save & Publish button on for the group that the user had publish rights to.
Are you seeing any Javascript errors in the console when switching to a group that the user has publishing rights to?
Offline
Pages: 1