Renamed roles guards
This commit is contained in:
parent
b27c4e60d8
commit
48b3abaf2c
@ -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;
|
||||||
@ -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';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user