Renamed roles guards

This commit is contained in:
Adina Țeudan 2023-11-01 00:58:52 +02:00 committed by Dan Percic
parent b27c4e60d8
commit 48b3abaf2c
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import { IqserUserService } from '../services/iqser-user.service';
import { TenantsService } from '../../tenants'; import { TenantsService } from '../../tenants';
import { AsyncGuard } from '../../services'; import { AsyncGuard } from '../../services';
export function doesNotHaveAnyRoleGuard(): AsyncGuard { export function doesNotHaveAnyRole(): AsyncGuard {
return async () => { return async () => {
const router = inject(Router); const router = inject(Router);
const activeTenantId = inject(TenantsService).activeTenantId; const activeTenantId = inject(TenantsService).activeTenantId;
@ -17,7 +17,7 @@ export function doesNotHaveAnyRoleGuard(): AsyncGuard {
}; };
} }
export function hasAnyRoleGuard(): AsyncGuard { export function hasAnyRole(): AsyncGuard {
return async () => { return async () => {
const router = inject(Router); const router = inject(Router);
const activeTenantId = inject(TenantsService).activeTenantId; const activeTenantId = inject(TenantsService).activeTenantId;

View File

@ -11,6 +11,6 @@ export * from './services/default-user.service';
export * from './iqser-users.module'; export * from './iqser-users.module';
export * from './guards/iqser-auth-guard.service'; export * from './guards/iqser-auth-guard.service';
export * from './guards/iqser-role-guard.service'; export * from './guards/iqser-role-guard.service';
export * from './guards/has-roles.guard'; export * from './guards/roles.guard';
export * from './components/user-button/user-button.component'; export * from './components/user-button/user-button.component';
export * from './components/initials-avatar/initials-avatar.component'; export * from './components/initials-avatar/initials-avatar.component';