dharmax/am-i-allowed

store#getRolesForUser should only have 2 arguments

Opened this issue · 1 comments

I'm working on creating a MongoPermissionStore for my own project.
I decided make a pull request as well.

But I think there is a design flaw that can be fixed

// types.ts:68
abstract getRolesForUser(actor: IActor, entity: IPrivilegeManaged, metadata: PermissionsMetaData)

I think this should only have 2 arguments, as IPrivilegeManaged already has a PermissionMetaData property

Let me know what you think

i think you're right (and i'm so sorry, i didn't see there's something in the issues/PR ....:-( ).
i'll check it in the future version and i also added comment on your PR.