mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-27 22:48:52 +00:00
fix(console): project member grants, user grants (#329)
* checkbox color * project grant preview * project grante expandable row * add grant detail component * proto regen * project grant members shared module * fix project grant members dialog * fix create dialog * lint * add avatar colors, meta component styling * light theme * dl report * styles * move grants out of user context, grant detail * i18n grant pipe * lint * user grants * clear expandable view project grants * fix project member routing * fix granted members routing * fix group label * rename project grant * disable zitadel grant members * fix routing user grant creation * rest member writes * ignore case searches * forkjoin observables for project search * fix grant creation with users * fix projectid reference * formfield table style, user grant dynamic load * show key if no displayvalue is set * Delete report.20200630.163913.44081.0.001.json Co-authored-by: Silvan <[email protected]>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
import { AuthUserService } from '../services/auth-user.service';
|
||||
|
||||
@Pipe({
|
||||
name: 'hasRole',
|
||||
pure: false,
|
||||
})
|
||||
export class HasRolePipe implements PipeTransform {
|
||||
|
||||
constructor(private authUserService: AuthUserService) { }
|
||||
|
||||
public transform(values: string[], each: boolean = false): any {
|
||||
return this.authUserService.isAllowed(values, each);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MomentModule } from 'ngx-moment';
|
||||
|
||||
import { HasRolePipe } from './has-role.pipe';
|
||||
import { LocalizedDatePipe } from './localized-date.pipe';
|
||||
import { TimestampToDatePipe } from './timestamp-to-date.pipe';
|
||||
|
||||
@@ -10,6 +11,7 @@ import { TimestampToDatePipe } from './timestamp-to-date.pipe';
|
||||
declarations: [
|
||||
LocalizedDatePipe,
|
||||
TimestampToDatePipe,
|
||||
HasRolePipe,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -18,6 +20,7 @@ import { TimestampToDatePipe } from './timestamp-to-date.pipe';
|
||||
exports: [
|
||||
LocalizedDatePipe,
|
||||
TimestampToDatePipe,
|
||||
HasRolePipe,
|
||||
],
|
||||
})
|
||||
export class PipesModule { }
|
||||
|
||||
Reference in New Issue
Block a user