mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 06:12:16 +00:00
15 lines
433 B
TypeScript
15 lines
433 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
|
|
|
@Pipe({
|
|
name: 'hasFeature',
|
|
})
|
|
export class HasFeaturePipe implements PipeTransform {
|
|
constructor(private authService: GrpcAuthService) { }
|
|
|
|
public transform(values: string[]): Observable<boolean> {
|
|
return this.authService.canUseFeature(values);
|
|
}
|
|
}
|