Skip to content

Commit

Permalink
Small fix for band codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Aug 29, 2024
1 parent 2074710 commit fcbe7c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions frontend/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const router = createRouter({
meta: {
pageTitle: PAGE_TITLES.COMPARE_STUDENTS,
requiresAuth: true,
role: 'PROCESS_STUDENT_ROLE'
role: 'STUDENT_SEARCH_ADMIN'
}
},
{
Expand Down Expand Up @@ -292,7 +292,7 @@ const router = createRouter({
meta: {
pageTitle: PAGE_TITLES.BAND_CODE_MANAGEMENT,
requiresAuth: true,
role: 'STUDENT_ADMIN_ADMINISTRATOR'
role: 'STAFF_ADMINISTRATION_ROLE'
},
},
{
Expand Down Expand Up @@ -714,7 +714,6 @@ router.beforeEach((to, _from, next) => {
}

const hasRole = Object.prototype.hasOwnProperty.call(aStore, to.meta.role) && aStore[to.meta.role];
// const hasRole = hasRequiredRole(aStore.userInfo, to.meta.role);
const hasPermission = hasRequiredPermission(aStore.userInfo, to.meta.permission);
if (!hasRole && !hasPermission) {
next('/unauthorized-page');
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/store/modules/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ export const authStore = defineStore('auth', {
NOMINAL_ROLL_READ_ONLY_ROLE: state => state.isValidNominalRollReadOnly,
NOMINAL_ROLL_ROLE: state => state.isValidNominalRollReadOnly || state.isValidNominalRollUser,
EDIT_NOMINAL_ROLL_ROLE: state => state.isValidNominalRollAdmin,
STAFF_ADMINISTRATION_ROLE: state => state.isValidStaffAdministrationAdmin, //gives access to admin section of navigation menu
STAFF_ADMINISTRATION_ADMIN: state => state.isValidNominalRollAdmin || state.isValidStaffAdministrationAdmin, //gives access to admin section of navigation menu
STUDENT_ANALYTICS_STUDENT_PROFILE: state => state.isValidGUMPAnalyticsUser,
STUDENT_ANALYTICS_BATCH: state => state.isValidPenRequestBatchAnalyticsUser,
HAS_STATS_ROLE: state => state.isValidGUMPAnalyticsUser || state.isValidPenRequestBatchAnalyticsUser,
},
HAS_STATS_ROLE: state => state.isValidGUMPAnalyticsUser || state.isValidPenRequestBatchAnalyticsUser
},
actions: {
//sets Json web token and determines whether user is authenticated
async setJwtToken(token = null) {
Expand Down

0 comments on commit fcbe7c5

Please sign in to comment.