Skip to content

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

Description

@krtschmr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions