After a fresh install of Open Atrium 2.13, the OG Permission don't allow Space members to 'Create Discussion Post content' (visit /admin/config/group/permissions/node/oa_space on your site):

This is supposed to be set by the oa_discussion feature. However, when going to this feature in the UI, it appears it's overridden and the permissions haven't been set:

Reverting the oa_discussion feature fixes this!
NOTE: This appears to affect ALL Open Atrium features! So, after install, Space members won't be able to create any content!
Original description
I have a fresh oa2 installation on pantheon, created a user with an editor rol, then a group and added that user, then the space with that group visibility.
Now my user with editor rol can see the section but can't add content, neither comment on the content added,
I have to make him group admin in order for him to add content.
I think I may be doing something wrong, but I followed the documentation and watched the videos.
As I understud, if the user is in the editor rol and belong to the group that has visibility rights for that space, he should be able to add content and comment on existing content.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | oa_core-og-permissions-fix-2188609.patch | 1.7 KB | dsnopek |
| #23 | Selection_107.png | 5.42 KB | dsnopek |
| #23 | Selection_106.png | 23.65 KB | dsnopek |
Comments
Comment #1
leofishman commentedEditor rol is allowed to post comment and I added the rol to create and modifie sections and teams, but I don't see reflected in the section page
Comment #2
Rodaou commentedHi,
Try to clear all caches, works for me.
Comment #3
leofishman commentedI cleared cache, added the user to the space, but the only thing that allow the user to manipulate section content is when he became admin.
Comment #4
Rodaou commentedWhen you said admin, you would say admin user role or admin in section members role ?
Comment #5
leofishman commentedadmin of the space, any other combination that I tried did not let the user manage content
Comment #6
Argus commentedI think, per node type, 3 conditions have to be met before a user can create, edit or delete content: the proper permissions firstly at the general user level (admin/people/permissions), secondly at the Space level (admin/config/group/roles/node/oa_space) and thirdly at the Group level (admin/config/group/roles/node/oa_group).
Correct me if I’m wrong.
Comment #7
dsnopekI'm pretty sure that Space permissions completely override the global Drupal permissions. I'm not sure what affect the Group ones have...
Comment #8
leofishman commentedI added permissions for group and space, but still an editor user for a group or space can't edit content.
Comment #9
Argus commentedYeah that is correct. The standard Drupal editor role that comes with OA has nothing to do with editing content, it is about editing Spaces and group membership : http://docs.openatrium.com/documentation/roles-permissions
Comment #10
leofishman commentedAs I understand from the documentation and the videos, you can have private spaces where only users that are members of that space can share content with all other users in that space, I think it is one of the more basic uses case for an intranet.
That funcionality then its not cominig out of the box?
Comment #11
Argus commentedYes it does, you need to set group visibility of a Space to private and it will act like that:
But that is a different issue then the one in the OP, right?
Comment #12
leofishman commentedthen it may be a bug, I can't make users belonging to a private space create any content unless they became admin of that space
Comment #13
dsnopekHave you created any Sections in your Space? I think by default only admins can create Sections. But once you've created some Sections which allow other types to be created (for example, a 'Discussion section' will allow 'Discussion posts' to be added) then normal users will be able to create those types via the "+" button in that Space.
Comment #14
leofishman commentedyes, I have created sections and content within it, and users can't even comment
Comment #15
pommard commentedHi,
are your sure your editor permissions in admin/people/permissions, section "node" are correctly checked?
Indeed, user need admin permissions to create spaces and subspaces. (even if it is written in the permissions to give to trusted people).....
Comment #16
dave kopecekI am having the same issue. Here's how I was able to allow a non-admin user to create space content:
For some reason "Edit my content" for my installed Document / Event / Task pages is set by default but not "Create"
I've tried creating a group, giving the group members Create permissions, adding the group to the space, but the space permissions appear to override this.
Are there docs or a screencast that explain this anywhere?
Comment #17
leofishman commentedDave, You are the man!!!!
Thanks a lot, I read all the docs and saw all the videos and they never explained that and for my intranet it is a very base use case, I almost drop openatrium because of this, now I can keep on.
Thanks a lot!
Comment #18
pommard commentedGreat. Thanks
Comment #19
Argus commentedGreat, another peace of the puzzle. You can set the default Space permissions at admin/config/group/roles/node/oa_space, but you can also override those and use a per Space permission profile like described in #16.
I will do a check what the default settings on a fresh installation are, it seems logical node creation should be allowed by default.
Comment #20
mpotter commentedThe default permissions should already allow this. There is a submodule called oa_adminrole within oa_core that is supposed to go through and give "Create xxx content" for each content type to the Members og_role.
So please let me know if this is not working.
Comment #21
mpotter commentedHmm, ignore #20. The oa_adminrole adds the "own" permissions for members.
The specific "Create xxx content" permissions should be added for members by the individual OA2 plugins. For example oa_discussions has an og_permissions feature to add this.
Maybe they had some Features that needed to be reverted?
Comment #22
micahw156@mpotter: I've been fighting with this for a couple of days myself, on a fresh install. Tried to ask about it in IRC but couldn't get a response. I'm in meetings all day tomorrow, but have delegated this to a coworker. Will have him follow up here or on IRC tomorrow or next week. We can also check to see if any features need to be reverted, but I doubt that's what's happening in our case.
Comment #23
dsnopekI'm able to recreate this on a fresh install! It does look like the OG Permissions aren't getting set by any of the Open Atrium features. I haven't tracked down the cause yet, but I've updated the issue description with very specific information about what's happening and screenshots.
Comment #24
dsnopekI did another fresh install - this time removing 'oa_adminrole' from the list of dependencies in openatrium.info and commenting out the call to
oa_adminrole_update_roles()in openatrium.install. This fixed the problem: the features aren't overridden (except, of course, many other permissions setup by oa_adminrole are missing)! So, somehow oa_adminrole is the cause.I've haven't tracked it down to specific lines in oa_adminrole, but if I had to guess, this code in
oa_adminrole_update_og_permissionslooks suspect:That appears to remove all permissions for members. If this code is running AFTER the Features have set their OG Permissions, it will remove them.
Probably what we should do instead of
db_delete()and thendb_insert()is adb_replace()OR adb_select()to see what's already set and onlydb_insert()the missing items, so it'll leave whatever is already there intact. I'll look to see if OG provides any helper functions to doing this...Anyway, if I find a code fix, I submit a patch!
Comment #25
dsnopekAttached is a patch to oa_core which fixes the issue for me on fresh install - all the permissions come up as they should! Please let me know what you think.
Comment #26
mpotter commentedNice catch of module execution order problem! Committed to affb0fb for oa_core.
Comment #27
dave kopecekI've got multiple OA2 installs built with permissions manually tweaked as in #16
What triggers the #25 patch code? Once patched, will editing and re-saving a space or group trigger a permission rebuild? Will things done as in #16 be overridden? I could make arguments why they should and shouldn't. Trying to understand the intent and get my head around this before backtracking up through the oa_adminrole_update_og_permissions() rabbit hole.
Comment #28
dsnopekThe patch here only fixes fresh installs. Anyone who has already installed will still need to fix their site manually.
Comment #30
SweetTomato commentedPer #6 above, is it true that Open Atrium 2 checks for a permission in ALL those places before it gives access? Or that if ANY apply to the current user, they get access?
Comment #31
Argus commentedEasiest way to find out is to create a test space and some test users and just try it out. Use trial and error.
Comment #32
MatthewTaylor-1 commentedI was having a real problem trying to work out what I was doing wrong (why I couldn't get the '+' button to show up for a site member). I followed Dave's instructions (#16), and now everything is working as it should.