Skip to content

Commit

Permalink
refactor(trpc/routes): change gameplay routes over to new file struct…
Browse files Browse the repository at this point in the history
…ure and rbac
  • Loading branch information
arthur-rl committed Jan 13, 2024
1 parent 89adfda commit a401d98
Show file tree
Hide file tree
Showing 13 changed files with 608 additions and 602 deletions.
12 changes: 12 additions & 0 deletions apps/app/server/trpc/rbac.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
*
* @param userScope
* The current logged on users scope;
* @param requiredScope
* The required scope
* @returns boolean
*/
export const userHasScope = (userScope: Array<string>, requiredScope: Array<string>): boolean => {
const userHasRequiredScope = requiredScope.some(a => userScope.includes(a));
return userHasRequiredScope;
}
Loading

0 comments on commit a401d98

Please sign in to comment.