I am looking to implement user roles in my application. Here is a snippet of the code I would like to use:
export interface User{
name: string
roles: Roles[]
}
interface Roles{
ADMIN: new Permissions(1,1,1,1,1),
MOD: new Permissions(1,0,1,1,0,0),
[...]
}
const user:User = {
name:"Me",
roles:[
Roles.ADMIN
]
}
I hope you can grasp the concept of what I am trying to achieve here. Do you think it's possible?