mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-04 18:08:50 +00:00
feat(console): getuserbyid, fix password policy validation, read iam (#233)
* remove displayname, show policy desc on patternerr * provide password complexity string, org create * user getuserbyid in userdetail, remove displayname * show multiple org domains * show zitadel project warnings, read iam * add missing ngondestroy impl
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { PasswordPatternPipe } from './password-pattern.pipe';
|
||||
|
||||
describe('PasswordPatternPipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new PasswordPatternPipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
import { PasswordComplexityPolicy } from '../proto/generated/management_pb';
|
||||
import { OrgService } from '../services/org.service';
|
||||
|
||||
@Pipe({
|
||||
name: 'passwordPattern',
|
||||
})
|
||||
export class PasswordPatternPipe implements PipeTransform {
|
||||
|
||||
constructor(private orgService: OrgService) { }
|
||||
|
||||
transform(policy: PasswordComplexityPolicy.AsObject, ...args: unknown[]): string {
|
||||
return this.orgService.getLocalizedComplexityPolicyPatternErrorString(policy);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,11 +3,13 @@ import { NgModule } from '@angular/core';
|
||||
import { MomentModule } from 'ngx-moment';
|
||||
|
||||
import { LocalizedDatePipe } from './localized-date.pipe';
|
||||
import { PasswordPatternPipe } from './password-pattern.pipe';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
LocalizedDatePipe,
|
||||
PasswordPatternPipe,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -15,6 +17,7 @@ import { LocalizedDatePipe } from './localized-date.pipe';
|
||||
],
|
||||
exports: [
|
||||
LocalizedDatePipe,
|
||||
PasswordPatternPipe,
|
||||
],
|
||||
})
|
||||
export class PipesModule { }
|
||||
|
||||
Reference in New Issue
Block a user