If I disable the "og_group_manager_full_access" setting, I am unable to manage settings properly.

Disabling this setting means that I lose access to edit the group node, and access any of the UI functionality, even if I set them in the global og permissions.

I will experiment a bit more, I may be missing a step.

Comments

the greenman’s picture

I have now tracked this down to an empty og_users_roles table.

amitaibu’s picture

> Disabling this setting means that I lose access to edit the group node,

Not exactly - it means that as a group manager you don't have all privileges by default. Which means you have to give them a role, or make sure "member" user has enough privileges to administer the group.

the greenman’s picture

og_roles seem to be tied directly to the UI module. The only place I can see them assigned is via og_ui_user_multiple_role_edit.

Should the admin role not be assigned to the group owner ? Maybe it's easiest to assign this in the same way that the AUTHENTICATED and ANONYMOUS roles are assigned in og_get_user_roles. If we go the database route, we have to keep track of changes in the uid, and know which roles were assigned automatically and which were assigned manually. Perhaps OWNER and ADMIN are different roles ?

I don't think roles should be tied to UI.

amitaibu’s picture

Category: bug » support

> Should the admin role not be assigned to the group owner ?

It can be, but not by default. It's like Drupal core, every user is authenticated -- all other roles are added with your own logic.

> I don't think roles should be tied to UI.

They are not, they are set via OG API (e.g. og_user_role_save).

the greenman’s picture

Category: support » bug
Status: Active » Closed (works as designed)

Ok, I can work with it. It might need to be explained somewhere, but I suppose it's not that far off from the UID=1 and an Admin role.

I will see if I can contribute an OWNER role module.

amitaibu’s picture

> I will see if I can contribute an OWNER role module.

What's the use case?

Instead of a module, you can also use Rules. However, there's still no Rules integration <-- Hint ;)

the greenman’s picture

Well. I have spent years (literally) removing public facing UI from OG sites. Now that this is in a seperate module, I am very happy... however, it would still be handy as a site admin to use some of the functionality provided by the UI module.

I disable the "og_group_manager_full_access" setting, but this means that the group managers now don't even have access to edit the group node. I need to give them back permissions to edit that, and therefore need to assign them a role.

If I want to have the group owner be an admin, but also want to keep my options open to assign multiple admins, I am concerned that there might be a few bits of twisted logic involved.

If I automatically assign the admin role to the node author, what happens if the author changes ? Do I then remove the role from the old admin and assign it to the new one ? What if I want to keep the old owner as an admin too ?

Creating a role that separates OWNER and ADMIN, means I don't have to worry about overlapping assignments, there is always one owner - and admin is something else if it needs to be.

the greenman’s picture

How about a user_roles_alter hook ?

It wouldn't really help for og_get_users_by_roles, but may help for special roles similar to authenticated and anonymous.

the greenman’s picture

Status: Closed (works as designed) » Active
StatusFileSize
new1.9 KB

I have written this module to get around things.

the greenman’s picture

on the Rules hint...I have written some rules stuff, but have not yet bitten the bullet and built the OG integration. My experience with rules in it's current state has been frustrating, but I am already using it to assign a system level group owner role.

Hope to get there soon..

the greenman’s picture

Status: Active » Closed (works as designed)

I can close this, there is no real need to change how things work now.

gaëlg’s picture

#9: useful module. You may create a real project so that people can help improve it.

Taxoman’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: bug » feature
Priority: Normal » Minor
Status: Closed (works as designed) » Active

What happened with this one, only into the module attached in #9, or is there some such functions in the works for OG 7.x-2.x? (or even already in its own project "somewhere"(...)?)

I am personally much in favor of having such a separation as an option, no problem if that would be a separate project, though.

Would like to know if this is on its way into OG or perhaps should be flagged as a potential separate module in its own project. If not on its way to OG core, it would be nice to keep this issue open for a while, especially since it contains an example module.

hefox’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

here's a patch that allows an option to dynamically grant the user the administer member role akin to how authenticated access is given

hefox’s picture

w/ admin page checkbox

hefox’s picture

Hm, Just found out about the auto role setting in OG, which sounds good, but sounds like only happens on create, which means weirdness if owner changed (course either way is weirdness).

amitaibu’s picture

> but sounds like only happens on create, which means weirdness if owner changed

I'd prefer to del with the ownership changing, rather then this constant auto-assignment

mpotter’s picture

You can probably close this issue. As mentioned in #16, the current "Group manager default roles" in the OG Settings form can be used to give the group manager the Administrator Member role.

I'll be removing this patch from Open Atrium 2.

amitaibu’s picture

Status: Needs review » Closed (won't fix)