aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-03-17 20:52:59 -0400
committerbenal01 <bja4245@rit.edu>2025-03-17 20:52:59 -0400
commit8951d00eddb147e5301454f250e503ad19aa47d3 (patch)
tree7bc1c11cc9d9dd81118d553198757250718fdf92
parent3f64404c23a95f3625754a79a753ed5ed4df3001 (diff)
downloadJellySolutions-8951d00eddb147e5301454f250e503ad19aa47d3.tar.gz
JellySolutions-8951d00eddb147e5301454f250e503ad19aa47d3.tar.bz2
JellySolutions-8951d00eddb147e5301454f250e503ad19aa47d3.zip
fixed user authentication bug where user was never admin
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.ts3
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
index fc5d7dd..c1bf66c 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
@@ -81,7 +81,8 @@ needs: any;
}
isManager() {
- return this.usersService.getCurrentUser()?.type == userType.MANAGER;
+ const type = this.usersService.getCurrentUser()?.type;
+ return type === ("MANAGER" as unknown as userType);
}
update(form: any) {
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.ts b/ufund-ui/src/app/components/need-list/need-list.component.ts
index 6ad9397..4409b63 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.ts
+++ b/ufund-ui/src/app/components/need-list/need-list.component.ts
@@ -88,7 +88,8 @@ export class NeedListComponent {
}
isManager() {
- return this.usersService.getCurrentUser()?.type == userType.MANAGER;
+ const type = this.usersService.getCurrentUser()?.type;
+ return type === ("MANAGER" as unknown as userType);
}
back() {