accesscontrol icon indicating copy to clipboard operation
accesscontrol copied to clipboard

Cannot inherit non-existent role when using grants in object

Open sebastiancrossa opened this issue 3 years ago • 0 comments

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

sebastiancrossa avatar Jun 15 '22 20:06 sebastiancrossa