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

Cannot inherit non-existent role when using grants in object #108

Open
sebastiancrossa opened this issue Jun 15, 2022 · 0 comments
Open

Comments

@sebastiancrossa
Copy link

What's expected: I'm able to create a role called paid_member that extends from base_member
What's happening: I'm getting an error saying the the role of base_member doesn't exist.

Screen Shot 2022-06-15 at 15 05 55

This is what the grant file looks like:

import AccessControl from 'accesscontrol'

const grants = {
  base_member: {
     user: {
       "read:own": ["*"]
     }
  },
  paid_member: {
    $extend: ["base_member"]
  }
}

const ac = new AccessControl(grants)

ac.lock()

export default ac
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