Skip to content

Commit 8d3611a

Browse files
committed
rename MANAGER to EVENTS_MANAGER
1 parent b9594e5 commit 8d3611a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/config.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ const genericConfig: GenericConfigType = {
3737
const environmentConfig: EnvironmentConfigType = {
3838
dev: {
3939
GroupRoleMapping: {
40-
"48591dbc-cdcb-4544-9f63-e6b92b067e33": [AppRoles.MANAGER], // Infra Chairs
41-
"940e4f9e-6891-4e28-9e29-148798495cdb": [AppRoles.MANAGER], // ACM Infra Team
42-
"f8dfc4cf-456b-4da3-9053-f7fdeda5d5d6": [AppRoles.MANAGER], // Infra Leads
43-
"0": [AppRoles.MANAGER], // Dummy Group for development only
40+
"48591dbc-cdcb-4544-9f63-e6b92b067e33": [AppRoles.EVENTS_MANAGER], // Infra Chairs
41+
"940e4f9e-6891-4e28-9e29-148798495cdb": [AppRoles.EVENTS_MANAGER], // ACM Infra Team
42+
"f8dfc4cf-456b-4da3-9053-f7fdeda5d5d6": [AppRoles.EVENTS_MANAGER], // Infra Leads
43+
"0": [AppRoles.EVENTS_MANAGER], // Dummy Group for development only
4444
"1": [AppRoles.PUBLIC], // Dummy Group for development only
4545
},
46-
AzureRoleMapping: { AutonomousWriters: [AppRoles.MANAGER] },
46+
AzureRoleMapping: { AutonomousWriters: [AppRoles.EVENTS_MANAGER] },
4747
ValidCorsOrigins: [
4848
"http://localhost:3000",
4949
"http://localhost:5173",
@@ -53,11 +53,11 @@ const environmentConfig: EnvironmentConfigType = {
5353
},
5454
prod: {
5555
GroupRoleMapping: {
56-
"48591dbc-cdcb-4544-9f63-e6b92b067e33": [AppRoles.MANAGER], // Infra Chairs
57-
"ff49e948-4587-416b-8224-65147540d5fc": [AppRoles.MANAGER], // Officers
58-
"ad81254b-4eeb-4c96-8191-3acdce9194b1": [AppRoles.MANAGER], // Exec
56+
"48591dbc-cdcb-4544-9f63-e6b92b067e33": [AppRoles.EVENTS_MANAGER], // Infra Chairs
57+
"ff49e948-4587-416b-8224-65147540d5fc": [AppRoles.EVENTS_MANAGER], // Officers
58+
"ad81254b-4eeb-4c96-8191-3acdce9194b1": [AppRoles.EVENTS_MANAGER], // Exec
5959
},
60-
AzureRoleMapping: { AutonomousWriters: [AppRoles.MANAGER] },
60+
AzureRoleMapping: { AutonomousWriters: [AppRoles.EVENTS_MANAGER] },
6161
ValidCorsOrigins: [
6262
"https://acm.illinois.edu",
6363
"https://www.acm.illinois.edu",

src/roles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
export const runEnvironments = ["dev", "prod"] as const;
33
export type RunEnvironment = (typeof runEnvironments)[number];
44
export enum AppRoles {
5-
MANAGER = "manage:events",
5+
EVENTS_MANAGER = "manage:events",
66
PUBLIC = "public",
77
}

src/routes/events.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
8181
await fastify.zodValidateBody(request, reply, postRequestSchema);
8282
},
8383
onRequest: async (request, reply) => {
84-
await fastify.authorize(request, reply, [AppRoles.MANAGER]);
84+
await fastify.authorize(request, reply, [AppRoles.EVENTS_MANAGER]);
8585
},
8686
},
8787
async (request, reply) => {
@@ -165,7 +165,7 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
165165
response: { 200: responseJsonSchema },
166166
},
167167
onRequest: async (request, reply) => {
168-
await fastify.authorize(request, reply, [AppRoles.MANAGER]);
168+
await fastify.authorize(request, reply, [AppRoles.EVENTS_MANAGER]);
169169
},
170170
},
171171
async (request: FastifyRequest<EventDeleteRequest>, reply) => {

0 commit comments

Comments
 (0)