If I create a top level public space, that anyone can view, I would like to hide the members link and the padlock, but I dont see anywhere this can be achieved

is it possible to hide these

Comments

Argus’s picture

Not by default. What you could do is install CSS injector and add a custom CSS rule for those pages containing:

#contextual-tabs > li {
display: none;
}
potassiumchloride’s picture

That route hides the tabs from everyone. My colleague solved our case with this code:

/* Hide Members and Visibility (Padlock) buttons in upper right sidebar */
#contextual-tabs #oa_visibility_toolbar, #contextual-tabs [title=Members] { display: none; }
hazit’s picture

Category: Support request » Feature request

Thanks potassiumchloride.

A bit surprised this not provided for in the main UI options given this is so prominent on the pages.

It seems to me the kind of functionality that would be good here would be something similar to that in editing mini-panels (see Mike's advice here: https://drupal.org/node/2146843).

This might already be possible but I could not figure out how to do it, and I think it makes sense for most users to avoid custom CSS for something like this...

...so maybe this is now a feature request?

mrburton’s picture

Is there any way to programmatically hide these links (including Configuration-link) from everyone except site admin by using Drupal hooks?

Facun1’s picture

I make it inserting directly the code proposed by Argus in the CSS code of panelizer (Full page override). The contextual tabs disappear for all users.
To let edit the users with that permission, I create a command button call "Edit", with this URL:" [current-page:url:unaliased]/edit ".
Then I put this command button in the panelizer content and I give the visibility rule "current has update permission from node via URL". (from Node: current access to current node).
It works if you want to do it with the content type or node by node.

With the code proposed by Potassiumchloride it works too.

mpotter’s picture

Status: Active » Fixed

For the Members link, set the access permissions on the /node/%/members panels page.

For the visibility icon, you can enable/disable this in the Open Atrium Config pages.

paean99’s picture

Unfortunately hiding the the links do not control the access to it. It is relevant when the list of the members of a space is a sensitive information.

About

For the Members link, set the access permissions on the /node/%/members panels page.

, i do not see how to use it without transforming the space in a private one.

There is a module that seems to adress this issue OG Hide Membership, but it is for drupal 6.

A simple solution would be to control the access to the membership page with some access module. It should restrict and hide the links to the pages in the panels. But adding one more module of that type in open atrium might bring some undesirables surprises.

This functionality seems to me a basic one in organic groups, but i don't see a permission anywhere. I must be missing something very simple.

mpotter’s picture

Go to admin/structure/pages/edit/page-space_members

Then click the Access tab on the left.

This is how you set access for a Panels page like the Members page.

paean99’s picture

So simple a solution.
Panels and Panelizer are used everywhere and so dependable that i have a tendency to forget the power of page manager.

I just followed your instructions and added 'OG: user membership in group' Access rules with 'Logged in user has "Active in Node: ID group" '.
Now only the members of the space can see the member page and even the visibility of the member tab is restricted.

Thanks :)

Status: Fixed » Closed (fixed)

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

hazit’s picture

Status: Closed (fixed) » Active

Hi Mike

Re #6: For the visibility icon, you can enable/disable this in the Open Atrium Config pages

I keep coming back to this post - I see you can disable the visibility 'padlock' icon in the OA config pages.

This works fine, but seems to turn it "on" or "off" for everyone.

Is there a straightforward way I can control access/visibility for different user roles?
(my goal is to show the 'padlock' for logged in users only, and hide it for all unauthenticated or anoymous users)

Otherwise very much enjoying the latest OA release. All the best.

paean99’s picture

Version: 7.x-2.12 » 7.x-2.33

@hazit.
Go to admin/structure/pages/nojs/operation/page-space_members/settings/access and add an 'OG: user membership in group' (Logged in user has "Active in Node: ID group"). Update an save.

It should show the member page only for members of the space.

As for the visibility 'padlock', you should take a look at this issue also:
How to remove or hide the contextual tabs on Document Page