Hi , I am new to Drupal Open Atruim. I am currently using OA2, when I create a "Document Page" type page, on the top right corner of the page, there are contextual tabs, such as the lock icon private/public tab, gear icon configure tab, pencil icon Edit tab, etc. I would like to hide/remove the tabs if the login user is non-admin user, how could I do that?

Before I submit this post, I looked through the settings, and did search, could not find the answer. If this issue was posted before, I apologize for that, and please lead me to the right direction.

Many thanks,

Comments

mpotter’s picture

The contextual tabs are just the normal Drupal tabs across the top of the page collapsed into buttons and a gear menu. So to remove them you do the same that you would do to remove the Drupal tabs. For example, if you don't want the Edit button, then you need to set permissions so the user cannot edit the node.

The lock icon is showing whether the content is public/private. It currently cannot be disabled but an option is being added for that.

colorstone’s picture

Thanks for your message Mike. Yes, the Edit button doesn't appear for non-admin user by default, The gear button is ok because for non-admin user, there is only "subscribe" available. My concern is the lock button, when user click the lock button on a private page, it lists the space name on which the users have access to this page, then when the user click the space name to open the space page, then click the lock button on the space page, it will have all user group list info. That's what I don't want non-admin user to open-- the group users list.

Do you mean you are adding an option to disable the lock button? Is that going to be available in the next release? I am currently running OA2.19.

Thanks a lot!

mpotter’s picture

colorstone: The latest -dev update of oa_contextual_tabs on github has the new option to disable the button.

The issue you raise is an interesting one though. In general, private group members are allowed to see the Member list of the group (via the Members button on the space page). So even if they can't get to the space page via the lock button, can't they still visit your space page manually and click the Members?

colorstone’s picture

Thanks Mike. I understand what you mean. For a small group/space, yes, group members normally can know each other and access the group member list. I am using the OA2 to build company intranet, for most of the privates pages will be accessible to all login users. I learned from you another post to use Document Page type to achieve the access control. For this case, that's why I don't want everybody to access the all user list. If I am doing a wrong way to build intranet, please correct me.

You mentioned manually access the space page, that's a good point. is there anyway to disable the "Members" button on the space page?

Many thanks !

colorstone’s picture

Thank you Mike. I downloaded the latest -dev update you mentioned, now the lock button can be disabled. It works great !

hefox’s picture

Project: Open Atrium Discussion » Open Atrium
Component: User interface » Discussion App
hosais’s picture

Hi, I read these messages and I know how to disable the buttons through /config/user-interface/contextual-tabs
Or with permission settings.

But about lock, public/private button: Is that right I still cannot disable them (buttons) (for the public space)? and the only way is changing from theme, module ...?

I just would like to disable some space for some space roles.

hosais

hosais’s picture

OK.
To disable access of members of the space, refer to here https://www.drupal.org/node/2373771. This is easy and great solution.

oxygenliu’s picture

Is there any way to hide the Gear icon for anonymous users visiting a public space?

mpotter’s picture

The Gear icon *should* hide if there are no items within it but it looks like there is a bug with that. I'll add this to the issue list.

mpotter’s picture

Version: 7.x-2.19 » 7.x-2.x-dev
Assigned: colorstone » Unassigned
Status: Active » Fixed

This is fixed in the 1.0-beta4 version of Contextual Tabs and will be part of the 2.30 stable OA later this week.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.