Generic permissions assigned by role would be a brilliant sub-module.

Create permissions for each context. Check permissions when trying to access anything inside a context.

This would allow you to create a "restricted" context and open up a whole new world of possibilities. Just to be clear, I'm not suggesting the permissions should be as granular as requiring the ACL project (like node_access, forum_access, or even organic groups). Simply a give each context a permission hook and enforce it.

Josh

Comments

yhahn’s picture

Assigned: Unassigned » yhahn
Status: Active » Postponed

This is a really interesting idea and I'd like to revisit these more structural/advanced features for context as soon as we get 2.x stable out and branch for 3.x.

joshmiller’s picture

yhahn,

I'd be interested in creating a "Context Access" contrib module if context is pluggable enough to make that happen. Rather, I know it's pluggable, but do you (or any of your co-horts) see an issue with making this a secondary contrib module?

Josh

joshmiller’s picture

Status: Postponed » Needs review

changing the status to get attention... Feel free to change it back to postponed.

yhahn’s picture

Assigned: yhahn » Unassigned
Status: Needs review » Active

Hi Josh,

You're welcome to implement this -- however do keep in mind a few things:

I think you will have trouble doing anything on the node_access level with the current architecture of context. So even if you set up permission restrictions with a context based on certain node types (for example), nodes of that type will still be visible in Views, listings, etc. outside that context that may pick them up.

Context reactions (in this case, something like a "permission denied" page) happen late in the Drupal page load -- that means that by the time all the conditions have run you are practically theming the page. While I believe it's still possible to drupal_access_denied() someone at this point, you'll want to check early on whether there are problems calling it this late before you get in too deep.

Otherwise, go ahead and dive into making a context_access module!

joshmiller’s picture

Status: Active » Postponed

I don't have the time to develop it at the moment -- all of my spare time is being spent in the D7 issue que. I will let you know if I pick this back up, otherwise you are welcome to implement it. Obviously, this would be a killer feature. Maybe I'm naive enough to think it would be simple to implement, though.

Josh

azuledu’s picture

What about this idea?

It would be really good to have the possibility to choose permissions for each context.

goldlilys’s picture

Subscribing. Would be cool to have this feature especially with use of content access and have different node updates showing up on home page depending on whether the user is logged in or not.

steven jones’s picture

Version: 6.x-2.0-beta2 » 6.x-3.x-dev
Status: Postponed » Active

This might be more appropriate for 3.x

amanaplan’s picture

Subscribing

marcushenningsen’s picture

Status: Active » Closed (duplicate)

More recent discussion on this topic is going on here: #661094: Permission for context module.

valderama’s picture

Status: Closed (duplicate) » Active

@marcushenningsen i think, the issue you are mentioning has nothing do with this one here. here the topic is context-based node access, over there the topic is "permissions to administer contexts".

hixster’s picture

any movement on this one?

paulocs’s picture

Issue summary: View changes

Hi, I know it is an old issue but as the 6.x-3.x is no longer supported, I'm closing it.
If you need it for context 7.* version, you can try https://www.drupal.org/project/context_permisssions.

paulocs’s picture

Status: Active » Fixed
paulocs’s picture

Status: Fixed » Closed (fixed)