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

can we define a hierarchy for the role lookup until it goes to global? #586

Open
krtschmr opened this issue Oct 10, 2022 · 0 comments
Open

Comments

@krtschmr
Copy link

From reading the docs I understand we can define a user who has access to a document.
If we check on the document if the user has access, we do check for a specific resource access if not, we fall back to global added role.

We do have a permission system where we define access on a Document or on the DocumentFolder or on the Global Level. So whenever we check access for a document, we must check resource access or via folder access or via global access

Is this something rolify can also handle (docs doesn't explain this). If not, can we achieve this with ease by configure something like

config.resource_access_lookup = {
  "Document"=> ["resource", "DocumentFolder", "global", ],
  "Template" => ["resource", "TemplateFolder", "UltraFolder", "EvenHigherFolderModel", "global" ]
}

Is our usecase even broad enough to make it worth a PR?

Currently we have a lot of customcode and by having rolify supporting our usecase we would like to actually use it and get rid of our pita code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant