Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature parent access #67

Merged
merged 5 commits into from
Jan 12, 2017
Merged

Feature parent access #67

merged 5 commits into from
Jan 12, 2017

Conversation

Exelord
Copy link
Owner

@Exelord Exelord commented Jan 12, 2017

Assumption

Add a possibility to customize accessible_for with parent_access flag to allow user determine if children of accessible resources should be also accessible.

Resource.accessible_for(current_user, { parent_access: true })
#                     (GRANTED) project1
#                                  |
#                                  |
#              (GRANTED) project2   project4 (GRANTED cuz it's a parent of granted resource)
#                           |          |
#                           |          |
#                           |       project5 (NOT granted - it's not a child of granted resource)
#                           |
#                           |
#                        project3 (member role - GRANTED)

Todo

  • Improve parent_access query (union -> join)

@Exelord Exelord merged commit 429f413 into master Jan 12, 2017
@Exelord Exelord deleted the feature-parent-access branch January 12, 2017 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant