1. Create a view and select "Spaces Feature" for the access restrictions.
  2. Set a feature to check for
  3. Set a permission to check for
  4. Add a page view, give it a path
  5. Save

Access a view with the feature disabled => no access = OK
Access a view with the feature disabled and an user who has not the required permission => access = NOK

If I look into the menu_router table I noticed that the access_arguments indicate spaces_access_feature as the access function.

I looked around in the spaces.module file: I think that spaces_access_feature_perms is the right access check function?!

I use this for a feature in OpenAtrium.
The OpenAtrium views access plugin provided in earlier versions worked for me.

CommentFileSizeAuthor
#1 spaces_fix_views_access_plugin.patch770 byteszero2one

Comments

zero2one’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new770 bytes

I located the problem. See attached patch.

zero2one’s picture

Status: Patch (to be ported) » Needs review
marcus178’s picture

I think I have the same problem or similar

If I set the access restriction to my feature and add a permission I wish to restrict it too, even if the user doesn't have that permission they can still access the view.

I have tried the patch but it had no effect for me. I'm also using open atrium

Grayside’s picture

@marcus178 did you try the patch then clear the cache to rebuild the menu access settings?

marcus178’s picture

Yes cleared the cache but still not working.

zero2one’s picture

You need to:
* open the view
* edit the access settings
* save access settings without changing the settings => this will change the settings in the menu_router table.
* save the view

Now it should work

marcus178’s picture

Sorry still not made any difference

marcus178’s picture

Actually just tried on a different installation of Open Atrium and it works, so must be something wrong in the other one, the only difference is the one that works is beta 8 and the one that doesn't is beta 9

marcus178’s picture

Sorry my bad, I'd updated the wrong line of code.

hefox’s picture

This was the bug that just got fixed with the security release, wasn't it?

zero2one’s picture

Status: Needs review » Fixed

The issue is fixed in Spaces 3.1 see http://drupal.org/node/1078936

Status: Fixed » Closed (fixed)

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