feat: rbac support with admin permission
authorxangelo <me@xangelo.ca>
Wed, 6 Sep 2023 18:54:41 +0000 (14:54 -0400)
committerxangelo <me@xangelo.ca>
Wed, 6 Sep 2023 18:56:28 +0000 (14:56 -0400)
commit940079de64c7a0c8070f5a78e656fe62c4f05603
treee6a81f5fa7c48b72febfe4543136baa43ab49101
parent4f6cf47abec65d784ddcee626e912ce6da508610
feat: rbac support with admin permission

There is now a permissions array on the player object loaded from
`loadPlayer` that includes a `permissions` array that lets us check if
the user has certain permissions.

Support permissions: admin,moderator

The first thing we did was remove the hard-coded key during chat resets
migrations/20230906180935_rbac.ts [new file with mode: 0644]
src/server/api.ts
src/server/player.ts
src/shared/player.ts