dashboard/api: add support for Zeppelin staff members; add ViewGuild permission; code cleanup

This commit is contained in:
Dragory 2020-05-23 16:22:03 +03:00
parent 7e60950900
commit d03d729438
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
13 changed files with 175 additions and 75 deletions

6
backend/src/staff.ts Normal file
View file

@ -0,0 +1,6 @@
/**
* Zeppelin staff have full access to the dashboard
*/
export function isStaff(userId: string) {
return (process.env.STAFF ?? "").split(",").includes(userId);
}