Implemented suggestions from code analysis
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<app-navigation>
|
||||
<app-messages></app-messages>
|
||||
<router-outlet></router-outlet>
|
||||
</app-navigation>
|
||||
|
||||
@@ -36,7 +36,7 @@ function initializeKeycloak(keycloak: KeycloakService) {
|
||||
flow: "standard"
|
||||
},
|
||||
shouldAddToken: (request) => {
|
||||
const { method, url } = request;
|
||||
const { url } = request;
|
||||
return url.startsWith(environment.backendURL);
|
||||
},
|
||||
loadUserProfileAtStartUp: true
|
||||
|
||||
@@ -24,7 +24,7 @@ export class AppAuthGuard extends KeycloakAuthGuard {
|
||||
// Get the roles required from the route.
|
||||
const requiredRoles = route.data['roles'];
|
||||
|
||||
let granted = false;
|
||||
let granted: boolean;
|
||||
|
||||
// Allow the user to to proceed if no additional roles are required to access the route.
|
||||
if (!(requiredRoles instanceof Array) || requiredRoles.length === 0) {
|
||||
|
||||
@@ -49,6 +49,6 @@ export class ElectionService {
|
||||
|
||||
/** Log a HeroService message with the MessageService */
|
||||
private log(message: string) {
|
||||
this.messageService.add(`HeroService: ${message}`);
|
||||
this.messageService.add(`ElectionService: ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,16 @@ body {
|
||||
}
|
||||
body, input[text], button {
|
||||
color: crimson;
|
||||
font-family: Cambria, Georgia;
|
||||
font-family: Cambria, Georgia, sans-serif;
|
||||
}
|
||||
|
||||
button.clear {
|
||||
font-family: Arial;
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #eee;
|
||||
border: none;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #cfd8dc;
|
||||
|
||||
Reference in New Issue
Block a user