Several fixes

- added organizations
- added industries
- added logo in 2 colors for light and dark theme
- improved authorization to allow multi tenancy
This commit is contained in:
Murat Özkorkmaz
2025-11-13 19:56:50 +01:00
parent 5d029221db
commit e901aefbf5
28 changed files with 997 additions and 134 deletions

View File

@@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import Keycloak from 'keycloak-js';
@Pipe({
name: 'isRoleAllowed',
standalone: true
})
export class IsRoleAllowedPipe implements PipeTransform {
constructor(private keycloak: Keycloak) {}
transform(allowed: string | string[], mode: 'any' | 'all' = 'any'): boolean {
const userRoles = this.keycloak.realmAccess?.roles ?? [];
const allowedRoles = Array.isArray(allowed) ? allowed : [allowed];
if (!allowedRoles.length) return true;
if (mode === 'all') return allowedRoles.every(r => userRoles.includes(r));
return allowedRoles.some(r => userRoles.includes(r));
}
}