Skip to content

Commit

Permalink
fix: allow system managers to browse even if 2FA enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Oct 1, 2024
1 parent a3f9f46 commit 4a5b876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dashboard/src2/components/NavigationItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export default {
const routeName = this.$route?.name || '';
const onboardingComplete = this.$team.doc.onboarding.complete;
const enforce2FA = Boolean(
this.$team.doc.enforce_2fa && !this.$team.doc.user_info?.is_2fa_enabled
!this.$team.doc.is_desk_user &&
this.$team.doc.enforce_2fa &&
!this.$team.doc.user_info?.is_2fa_enabled
);
return [
Expand Down
1 change: 1 addition & 0 deletions dashboard/src2/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ router.beforeEach(async (to, from, next) => {
const Enable2FARoute = 'Enable2FA';
if (
to.name !== Enable2FARoute &&
!$team.doc.is_desk_user &&
$team.doc.enforce_2fa &&
!$team.doc.user_info.is_2fa_enabled
) {
Expand Down

0 comments on commit 4a5b876

Please sign in to comment.