bcgov/vue-scaffold

View on GitHub
app/frontend/src/store/modules/auth.js

Summary

Maintainability
A
50 mins
Test Coverage
A
100%

Showing 3 of 3 total issues

Function login has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

login({ commit, getters }, idpHint = undefined) {
if (getters.keycloakReady) {
// Use existing redirect uri if available
if (!getters.redirectUri) commit('SET_REDIRECTURI', location.toString());
 
 
Severity: Minor
Found in app/frontend/src/store/modules/auth.js - About 25 mins to fix

Function hasResourceRoles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

hasResourceRoles: (_state, getters) => (resource, roles) => {
if (!getters.authenticated) return false;
if (!roles.length) return true; // No roles to check against
 
if (getters.resourceAccess[resource]) {
Severity: Minor
Found in app/frontend/src/store/modules/auth.js - About 25 mins to fix

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Vue from 'vue';

There are no issues that match your filters.

Category
Status