mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:57:33 +00:00
feat: add it-IT to internationalization (#2439)
* login it * deepl translations, corrections * login, en typos * it internal, typo fixes * message texts, optim console texts, guide for internationalization * missing console, fix de, en * Add missing keys from main * translate missing keys * add it to console selection, change it policy descriptors * add missing i18n from jwt idp, fixes * add missing translations * missing translations * fix * auth user language change, interceptor * remove multiline operator Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -21,27 +21,20 @@ import { ManagementService } from './services/mgmt.service';
|
||||
import { ThemeService } from './services/theme.service';
|
||||
import { UpdateService } from './services/update.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss'],
|
||||
animations: [
|
||||
toolbarAnimation,
|
||||
...navAnimations,
|
||||
accountCard,
|
||||
routeAnimations,
|
||||
adminLineAnimation,
|
||||
],
|
||||
animations: [toolbarAnimation, ...navAnimations, accountCard, routeAnimations, adminLineAnimation],
|
||||
})
|
||||
export class AppComponent implements OnDestroy {
|
||||
@ViewChild('drawer') public drawer!: MatDrawer;
|
||||
@ViewChild('input', { static: false }) input!: ElementRef;
|
||||
public isHandset$: Observable<boolean> = this.breakpointObserver
|
||||
.observe('(max-width: 599px)')
|
||||
.pipe(map(result => {
|
||||
public isHandset$: Observable<boolean> = this.breakpointObserver.observe('(max-width: 599px)').pipe(
|
||||
map((result) => {
|
||||
return result.matches;
|
||||
}));
|
||||
}),
|
||||
);
|
||||
@HostBinding('class') public componentCssClass: string = 'dark-theme';
|
||||
|
||||
public showAccount: boolean = false;
|
||||
@@ -78,9 +71,18 @@ export class AppComponent implements OnDestroy {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
@Inject(DOCUMENT) private document: Document,
|
||||
) {
|
||||
console.log('%cWait!', 'text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; color: #5469D4; font-size: 50px');
|
||||
console.log('%cInserting something here could give attackers access to your zitadel account.', 'color: red; font-size: 18px');
|
||||
console.log('%cIf you don\'t know exactly what you\'re doing, close the window and stay on the safe side', 'font-size: 16px');
|
||||
console.log(
|
||||
'%cWait!',
|
||||
'text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; color: #5469D4; font-size: 50px',
|
||||
);
|
||||
console.log(
|
||||
'%cInserting something here could give attackers access to your zitadel account.',
|
||||
'color: red; font-size: 18px',
|
||||
);
|
||||
console.log(
|
||||
"%cIf you don't know exactly what you're doing, close the window and stay on the safe side",
|
||||
'font-size: 16px',
|
||||
);
|
||||
console.log('%cIf you know exactly what you are doing, you should work for us', 'font-size: 16px');
|
||||
this.setLanguage();
|
||||
|
||||
@@ -109,10 +111,7 @@ export class AppComponent implements OnDestroy {
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lightbulb-off-outline.svg'),
|
||||
);
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_radar',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/radar.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_radar', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/radar.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_lock_question',
|
||||
@@ -129,20 +128,14 @@ export class AppComponent implements OnDestroy {
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lock-reset.svg'),
|
||||
);
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_broom',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/broom.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_broom', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/broom.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_pin_outline',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/pin-outline.svg'),
|
||||
);
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_pin',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/pin.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_pin', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/pin.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_format-letter-case-lower',
|
||||
@@ -159,54 +152,40 @@ export class AppComponent implements OnDestroy {
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/counter.svg'),
|
||||
);
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_openid',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/openid.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_openid', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/openid.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_jwt',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/jwt.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_jwt', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/jwt.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_symbol',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/symbol.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_symbol', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/symbol.svg'));
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_numeric',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/numeric.svg'),
|
||||
);
|
||||
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
'mdi_api',
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/api.svg'),
|
||||
);
|
||||
this.matIconRegistry.addSvgIcon('mdi_api', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/api.svg'));
|
||||
|
||||
this.activatedRoute.queryParams
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe(route => {
|
||||
const { org } = route;
|
||||
if (org) {
|
||||
this.authService.getActiveOrg(org).then(queriedOrg => {
|
||||
this.org = queriedOrg;
|
||||
});
|
||||
}
|
||||
});
|
||||
this.activatedRoute.queryParams.pipe(takeUntil(this.destroy$)).subscribe((route) => {
|
||||
const { org } = route;
|
||||
if (org) {
|
||||
this.authService.getActiveOrg(org).then((queriedOrg) => {
|
||||
this.org = queriedOrg;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.loadPrivateLabelling();
|
||||
|
||||
this.getProjectCount();
|
||||
|
||||
this.authService.activeOrgChanged.pipe(takeUntil(this.destroy$)).subscribe(org => {
|
||||
this.authService.activeOrgChanged.pipe(takeUntil(this.destroy$)).subscribe((org) => {
|
||||
this.org = org;
|
||||
this.getProjectCount();
|
||||
});
|
||||
|
||||
this.authenticationService.authenticationChanged.pipe(takeUntil(this.destroy$)).subscribe((authenticated) => {
|
||||
if (authenticated) {
|
||||
this.authService.getActiveOrg().then(org => {
|
||||
this.authService.getActiveOrg().then((org) => {
|
||||
this.org = org;
|
||||
});
|
||||
}
|
||||
@@ -219,17 +198,15 @@ export class AppComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
this.isDarkTheme = this.themeService.isDarkTheme;
|
||||
this.isDarkTheme.subscribe(dark => this.onSetTheme(dark ? 'dark-theme' : 'light-theme'));
|
||||
this.isDarkTheme.subscribe((dark) => this.onSetTheme(dark ? 'dark-theme' : 'light-theme'));
|
||||
|
||||
this.translate.onLangChange.subscribe((language: LangChangeEvent) => {
|
||||
this.document.documentElement.lang = language.lang;
|
||||
this.language = language.lang;
|
||||
});
|
||||
|
||||
this.filterControl.valueChanges.pipe(debounceTime(300)).subscribe(value => {
|
||||
this.loadOrgs(
|
||||
value.trim().toLowerCase(),
|
||||
);
|
||||
this.filterControl.valueChanges.pipe(debounceTime(300)).subscribe((value) => {
|
||||
this.loadOrgs(value.trim().toLowerCase());
|
||||
});
|
||||
|
||||
this.hideAdminWarn = localStorage.getItem('hideAdministratorWarning') === 'true' ? true : false;
|
||||
@@ -270,7 +247,7 @@ export class AppComponent implements OnDestroy {
|
||||
|
||||
setDefaultColors();
|
||||
|
||||
this.mgmtService.getLabelPolicy().then(labelpolicy => {
|
||||
this.mgmtService.getLabelPolicy().then((labelpolicy) => {
|
||||
if (labelpolicy.policy) {
|
||||
this.labelpolicy = labelpolicy.policy;
|
||||
|
||||
@@ -296,8 +273,7 @@ export class AppComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
public loadPolicies(): void {
|
||||
this.mgmtService.getPrivacyPolicy().then(privacypolicy => {
|
||||
|
||||
this.mgmtService.getPrivacyPolicy().then((privacypolicy) => {
|
||||
if (privacypolicy.policy) {
|
||||
this.privacyPolicy = privacypolicy.policy;
|
||||
}
|
||||
@@ -316,7 +292,7 @@ export class AppComponent implements OnDestroy {
|
||||
|
||||
this.orgLoading$.next(true);
|
||||
this.orgs$ = from(this.authService.listMyProjectOrgs(10, 0, query ? [query] : undefined)).pipe(
|
||||
map(resp => {
|
||||
map((resp) => {
|
||||
return resp.resultList.sort((left, right) => left.name.localeCompare(right.name));
|
||||
}),
|
||||
catchError(() => of([])),
|
||||
@@ -347,16 +323,15 @@ export class AppComponent implements OnDestroy {
|
||||
this.translate.addLangs(['en', 'de']);
|
||||
this.translate.setDefaultLang('en');
|
||||
|
||||
this.authService.user.subscribe(userprofile => {
|
||||
this.authService.user.subscribe((userprofile) => {
|
||||
if (userprofile) {
|
||||
// this.user = userprofile;
|
||||
const cropped = navigator.language.split('-')[0] ?? 'en';
|
||||
const fallbackLang = cropped.match(/en|de/) ? cropped : 'en';
|
||||
const fallbackLang = cropped.match(/en|de|it/) ? cropped : 'en';
|
||||
|
||||
const lang =
|
||||
userprofile?.human?.profile?.preferredLanguage.match(/en|de/) ?
|
||||
userprofile.human.profile?.preferredLanguage :
|
||||
fallbackLang;
|
||||
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|it/)
|
||||
? userprofile.human.profile?.preferredLanguage
|
||||
: fallbackLang;
|
||||
this.translate.use(lang);
|
||||
this.language = lang;
|
||||
this.document.documentElement.lang = lang;
|
||||
@@ -388,4 +363,3 @@ export class AppComponent implements OnDestroy {
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -107,7 +107,7 @@ export class LoginTextsComponent implements OnDestroy {
|
||||
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
|
||||
|
||||
public KeyNamesArray: string[] = KeyNamesArray;
|
||||
public LOCALES: string[] = ['en'];
|
||||
public LOCALES: string[] = ['en', 'de', 'it'];
|
||||
|
||||
private sub: Subscription = new Subscription();
|
||||
|
||||
|
@@ -383,7 +383,7 @@ export class MessageTextsComponent implements OnDestroy {
|
||||
};
|
||||
|
||||
public locale: string = 'en';
|
||||
public LOCALES: string[] = ['en'];
|
||||
public LOCALES: string[] = ['en', 'de', 'it'];
|
||||
private sub: Subscription = new Subscription();
|
||||
public currentPolicy: GridPolicy = MESSAGE_TEXTS_POLICY;
|
||||
|
||||
|
@@ -18,7 +18,7 @@ import { EditDialogComponent, EditDialogType } from './edit-dialog/edit-dialog.c
|
||||
export class AuthUserDetailComponent implements OnDestroy {
|
||||
public user!: User.AsObject;
|
||||
public genders: Gender[] = [Gender.GENDER_MALE, Gender.GENDER_FEMALE, Gender.GENDER_DIVERSE];
|
||||
public languages: string[] = ['de', 'en'];
|
||||
public languages: string[] = ['de', 'en', 'it'];
|
||||
|
||||
private subscription: Subscription = new Subscription();
|
||||
|
||||
@@ -39,19 +39,26 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
) {
|
||||
this.loading = true;
|
||||
this.refreshUser();
|
||||
|
||||
this.userService.getSupportedLanguages().then((lang) => {
|
||||
this.languages = lang.languagesList;
|
||||
});
|
||||
}
|
||||
|
||||
refreshUser(): void {
|
||||
this.refreshChanges$.emit();
|
||||
this.userService.getMyUser().then(resp => {
|
||||
if (resp.user) {
|
||||
this.user = resp.user;
|
||||
}
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
this.loading = false;
|
||||
});
|
||||
this.userService
|
||||
.getMyUser()
|
||||
.then((resp) => {
|
||||
if (resp.user) {
|
||||
this.user = resp.user;
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
@@ -71,13 +78,15 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
width: '400px',
|
||||
});
|
||||
|
||||
dialogRefPhone.afterClosed().subscribe(resp => {
|
||||
dialogRefPhone.afterClosed().subscribe((resp) => {
|
||||
if (resp && resp !== this.user.userName) {
|
||||
this.userService.updateMyUserName(resp).then(() => {
|
||||
this.userService
|
||||
.updateMyUserName(resp)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.USERNAMECHANGED', true);
|
||||
this.refreshUser();
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -101,7 +110,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
this.toast.showInfo('USER.TOAST.SAVED', true);
|
||||
this.refreshChanges$.emit();
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -109,7 +118,8 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
|
||||
public saveEmail(email: string): void {
|
||||
this.userService
|
||||
.setMyEmail(email).then(() => {
|
||||
.setMyEmail(email)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.EMAILSAVED', true);
|
||||
if (this.user.human) {
|
||||
const mailToSet = new Email();
|
||||
@@ -117,18 +127,22 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
this.user.human.email = mailToSet.toObject();
|
||||
this.refreshUser();
|
||||
}
|
||||
}).catch(error => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
public enteredPhoneCode(code: string): void {
|
||||
this.userService.verifyMyPhone(code).then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONESAVED', true);
|
||||
this.refreshUser();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
this.userService
|
||||
.verifyMyPhone(code)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONESAVED', true);
|
||||
this.refreshUser();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
public changedLanguage(language: string): void {
|
||||
@@ -136,40 +150,50 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
public resendPhoneVerification(): void {
|
||||
this.userService.resendMyPhoneVerification().then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONEVERIFICATIONSENT', true);
|
||||
this.refreshChanges$.emit();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
this.userService
|
||||
.resendMyPhoneVerification()
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONEVERIFICATIONSENT', true);
|
||||
this.refreshChanges$.emit();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
public resendEmailVerification(): void {
|
||||
this.userService.resendMyEmailVerification().then(() => {
|
||||
this.toast.showInfo('USER.TOAST.EMAILVERIFICATIONSENT', true);
|
||||
this.refreshChanges$.emit();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
this.userService
|
||||
.resendMyEmailVerification()
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.EMAILVERIFICATIONSENT', true);
|
||||
this.refreshChanges$.emit();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
public deletePhone(): void {
|
||||
this.userService.removeMyPhone().then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONEREMOVED', true);
|
||||
if (this.user.human?.phone) {
|
||||
const phone = new Phone();
|
||||
this.user.human.phone = phone.toObject();
|
||||
this.refreshUser();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
this.userService
|
||||
.removeMyPhone()
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONEREMOVED', true);
|
||||
if (this.user.human?.phone) {
|
||||
const phone = new Phone();
|
||||
this.user.human.phone = phone.toObject();
|
||||
this.refreshUser();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
public savePhone(phone: string): void {
|
||||
if (this.user.human) {
|
||||
this.userService
|
||||
.setMyPhone(phone).then(() => {
|
||||
.setMyPhone(phone)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.PHONESAVED', true);
|
||||
if (this.user.human) {
|
||||
const phoneToSet = new Phone();
|
||||
@@ -177,7 +201,8 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
this.user.human.phone = phoneToSet.toObject();
|
||||
this.refreshUser();
|
||||
}
|
||||
}).catch(error => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -199,7 +224,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
width: '400px',
|
||||
});
|
||||
|
||||
dialogRefPhone.afterClosed().subscribe(resp => {
|
||||
dialogRefPhone.afterClosed().subscribe((resp) => {
|
||||
if (resp) {
|
||||
this.savePhone(resp);
|
||||
}
|
||||
@@ -219,7 +244,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
width: '400px',
|
||||
});
|
||||
|
||||
dialogRefEmail.afterClosed().subscribe(resp => {
|
||||
dialogRefEmail.afterClosed().subscribe((resp) => {
|
||||
if (resp) {
|
||||
this.saveEmail(resp);
|
||||
}
|
||||
|
@@ -22,6 +22,8 @@ import {
|
||||
GetMyProfileResponse,
|
||||
GetMyUserRequest,
|
||||
GetMyUserResponse,
|
||||
GetSupportedLanguagesRequest,
|
||||
GetSupportedLanguagesResponse,
|
||||
ListMyAuthFactorsRequest,
|
||||
ListMyAuthFactorsResponse,
|
||||
ListMyLinkedIDPsRequest,
|
||||
@@ -86,8 +88,6 @@ import { Gender, MembershipQuery, User, WebAuthNVerification } from '../proto/ge
|
||||
import { GrpcService } from './grpc.service';
|
||||
import { StorageKey, StorageLocation, StorageService } from './storage.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@@ -108,26 +108,26 @@ export class GrpcAuthService {
|
||||
private storage: StorageService,
|
||||
) {
|
||||
this.user = merge(
|
||||
of(this.oauthService.getAccessToken()).pipe(
|
||||
filter(token => token ? true : false),
|
||||
),
|
||||
of(this.oauthService.getAccessToken()).pipe(filter((token) => (token ? true : false))),
|
||||
this.oauthService.events.pipe(
|
||||
filter(e => e.type === 'token_received'),
|
||||
filter((e) => e.type === 'token_received'),
|
||||
timeout(this.oauthService.waitForTokenInMsec || 0),
|
||||
catchError(_ => of(null)), // timeout is not an error
|
||||
map(_ => this.oauthService.getAccessToken()),
|
||||
catchError((_) => of(null)), // timeout is not an error
|
||||
map((_) => this.oauthService.getAccessToken()),
|
||||
),
|
||||
).pipe(
|
||||
take(1),
|
||||
mergeMap(() => {
|
||||
return from(this.getMyUser().then(resp => {
|
||||
const user = resp.user;
|
||||
if (user) {
|
||||
return user;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}));
|
||||
return from(
|
||||
this.getMyUser().then((resp) => {
|
||||
const user = resp.user;
|
||||
if (user) {
|
||||
return user;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}),
|
||||
);
|
||||
}),
|
||||
finalize(() => {
|
||||
this.loadPermissions();
|
||||
@@ -143,7 +143,7 @@ export class GrpcAuthService {
|
||||
|
||||
public async getActiveOrg(id?: string): Promise<Org.AsObject> {
|
||||
if (id) {
|
||||
const find = this.cachedOrgs.find(tmp => tmp.id === id);
|
||||
const find = this.cachedOrgs.find((tmp) => tmp.id === id);
|
||||
if (find) {
|
||||
this.setActiveOrg(find);
|
||||
return Promise.resolve(find);
|
||||
@@ -151,7 +151,7 @@ export class GrpcAuthService {
|
||||
const orgs = (await this.listMyProjectOrgs(10, 0)).resultList;
|
||||
this.cachedOrgs = orgs;
|
||||
|
||||
const toFind = this.cachedOrgs.find(tmp => tmp.id === id);
|
||||
const toFind = this.cachedOrgs.find((tmp) => tmp.id === id);
|
||||
if (toFind) {
|
||||
this.setActiveOrg(toFind);
|
||||
return Promise.resolve(toFind);
|
||||
@@ -167,7 +167,7 @@ export class GrpcAuthService {
|
||||
}
|
||||
|
||||
const org = this.storage.getItem<Org.AsObject>(StorageKey.organization, StorageLocation.local);
|
||||
if (org && orgs.find(tmp => tmp.id === org.id)) {
|
||||
if (org && orgs.find((tmp) => tmp.id === org.id)) {
|
||||
this.storage.setItem(StorageKey.organization, org, StorageLocation.session);
|
||||
return org;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ export class GrpcAuthService {
|
||||
if (orgs.length === 0) {
|
||||
return Promise.reject(new Error('No organizations found!'));
|
||||
}
|
||||
const orgToSet = orgs.find(element => element.id !== '0' && element.name !== '');
|
||||
const orgToSet = orgs.find((element) => element.id !== '0' && element.name !== '');
|
||||
|
||||
if (orgToSet) {
|
||||
this.setActiveOrg(orgToSet);
|
||||
@@ -197,31 +197,35 @@ export class GrpcAuthService {
|
||||
}
|
||||
|
||||
private loadPermissions(): void {
|
||||
from(this.listMyZitadelPermissions()).pipe(
|
||||
map(rolesResp => rolesResp.resultList),
|
||||
catchError(_ => {
|
||||
return of([]);
|
||||
}),
|
||||
finalize(() => {
|
||||
this.fetchedZitadelPermissions.next(true);
|
||||
}),
|
||||
).subscribe(roles => {
|
||||
this.zitadelPermissions.next(roles);
|
||||
});
|
||||
from(this.listMyZitadelPermissions())
|
||||
.pipe(
|
||||
map((rolesResp) => rolesResp.resultList),
|
||||
catchError((_) => {
|
||||
return of([]);
|
||||
}),
|
||||
finalize(() => {
|
||||
this.fetchedZitadelPermissions.next(true);
|
||||
}),
|
||||
)
|
||||
.subscribe((roles) => {
|
||||
this.zitadelPermissions.next(roles);
|
||||
});
|
||||
}
|
||||
|
||||
private loadFeatures(): void {
|
||||
from(this.listMyZitadelFeatures()).pipe(
|
||||
map(featuresResp => featuresResp.resultList),
|
||||
catchError(_ => {
|
||||
return of([]);
|
||||
}),
|
||||
finalize(() => {
|
||||
this.fetchedZitadelFeatures.next(true);
|
||||
}),
|
||||
).subscribe(features => {
|
||||
this.zitadelFeatures.next(features);
|
||||
});
|
||||
from(this.listMyZitadelFeatures())
|
||||
.pipe(
|
||||
map((featuresResp) => featuresResp.resultList),
|
||||
catchError((_) => {
|
||||
return of([]);
|
||||
}),
|
||||
finalize(() => {
|
||||
this.fetchedZitadelFeatures.next(true);
|
||||
}),
|
||||
)
|
||||
.subscribe((features) => {
|
||||
this.zitadelFeatures.next(features);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,7 +234,7 @@ export class GrpcAuthService {
|
||||
*/
|
||||
public isAllowed(roles: string[] | RegExp[]): Observable<boolean> {
|
||||
if (roles && roles.length > 0) {
|
||||
return this.zitadelPermissions.pipe(switchMap(zroles => of(this.hasRoles(zroles, roles))));
|
||||
return this.zitadelPermissions.pipe(switchMap((zroles) => of(this.hasRoles(zroles, roles))));
|
||||
} else {
|
||||
return of(false);
|
||||
}
|
||||
@@ -242,11 +246,15 @@ export class GrpcAuthService {
|
||||
* @param requestedRoles required roles for accessing the respective component
|
||||
*/
|
||||
public hasRoles(userRoles: string[], requestedRoles: string[] | RegExp[]): boolean {
|
||||
return requestedRoles.findIndex((regexp: any) => {
|
||||
return userRoles.findIndex(role => {
|
||||
return new RegExp(regexp).test(role);
|
||||
}) > -1;
|
||||
}) > -1;
|
||||
return (
|
||||
requestedRoles.findIndex((regexp: any) => {
|
||||
return (
|
||||
userRoles.findIndex((role) => {
|
||||
return new RegExp(regexp).test(role);
|
||||
}) > -1
|
||||
);
|
||||
}) > -1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -255,7 +263,7 @@ export class GrpcAuthService {
|
||||
*/
|
||||
public canUseFeature(features: string[] | RegExp[]): Observable<boolean> {
|
||||
if (features && features.length > 0) {
|
||||
return this.zitadelFeatures.pipe(switchMap(zFeatures => of(this.hasFeature(zFeatures, features))));
|
||||
return this.zitadelFeatures.pipe(switchMap((zFeatures) => of(this.hasFeature(zFeatures, features))));
|
||||
} else {
|
||||
return of(false);
|
||||
}
|
||||
@@ -267,33 +275,33 @@ export class GrpcAuthService {
|
||||
* @param requestedFeature required features for accessing the respective component
|
||||
*/
|
||||
public hasFeature(userFeatures: string[], requestedFeatures: string[] | RegExp[]): boolean {
|
||||
return requestedFeatures.findIndex((regexp: any) => {
|
||||
return userFeatures.findIndex(feature => {
|
||||
return new RegExp(regexp).test(feature);
|
||||
}) > -1;
|
||||
}) > -1;
|
||||
return (
|
||||
requestedFeatures.findIndex((regexp: any) => {
|
||||
return (
|
||||
userFeatures.findIndex((feature) => {
|
||||
return new RegExp(regexp).test(feature);
|
||||
}) > -1
|
||||
);
|
||||
}) > -1
|
||||
);
|
||||
}
|
||||
|
||||
public getMyProfile(): Promise<GetMyProfileResponse.AsObject> {
|
||||
return this.grpcService.auth.getMyProfile(new GetMyProfileRequest(), null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.getMyProfile(new GetMyProfileRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getMyPasswordComplexityPolicy(): Promise<GetMyPasswordComplexityPolicyResponse.AsObject> {
|
||||
return this.grpcService.auth.getMyPasswordComplexityPolicy(
|
||||
new GetMyPasswordComplexityPolicyRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth
|
||||
.getMyPasswordComplexityPolicy(new GetMyPasswordComplexityPolicyRequest(), null)
|
||||
.then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getMyUser(): Promise<GetMyUserResponse.AsObject> {
|
||||
return this.grpcService.auth.getMyUser(
|
||||
new GetMyUserRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.getMyUser(new GetMyUserRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyMultiFactors(): Promise<ListMyAuthFactorsResponse.AsObject> {
|
||||
return this.grpcService.auth.listMyAuthFactors(
|
||||
new ListMyAuthFactorsRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyAuthFactors(new ListMyAuthFactorsRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyProjectOrgs(
|
||||
@@ -313,7 +321,7 @@ export class GrpcAuthService {
|
||||
req.setQueriesList(queryList);
|
||||
}
|
||||
|
||||
return this.grpcService.auth.listMyProjectOrgs(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyProjectOrgs(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateMyProfile(
|
||||
@@ -343,7 +351,7 @@ export class GrpcAuthService {
|
||||
if (preferredLanguage) {
|
||||
req.setPreferredLanguage(preferredLanguage);
|
||||
}
|
||||
return this.grpcService.auth.updateMyProfile(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.updateMyProfile(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public get zitadelPermissionsChanged(): Observable<string[]> {
|
||||
@@ -352,11 +360,14 @@ export class GrpcAuthService {
|
||||
|
||||
public listMyUserSessions(): Promise<ListMyUserSessionsResponse.AsObject> {
|
||||
const req = new ListMyUserSessionsRequest();
|
||||
return this.grpcService.auth.listMyUserSessions(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyUserSessions(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyUserGrants(limit?: number, offset?: number, queryList?: ListQuery[]):
|
||||
Promise<ListMyUserGrantsResponse.AsObject> {
|
||||
public listMyUserGrants(
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
queryList?: ListQuery[],
|
||||
): Promise<ListMyUserGrantsResponse.AsObject> {
|
||||
const req = new ListMyUserGrantsRequest();
|
||||
const query = new ListQuery();
|
||||
if (limit) {
|
||||
@@ -366,10 +377,12 @@ export class GrpcAuthService {
|
||||
query.setOffset(offset);
|
||||
}
|
||||
req.setQuery(query);
|
||||
return this.grpcService.auth.listMyUserGrants(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyUserGrants(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyMemberships(limit: number, offset: number,
|
||||
public listMyMemberships(
|
||||
limit: number,
|
||||
offset: number,
|
||||
queryList?: MembershipQuery[],
|
||||
): Promise<ListMyMembershipsResponse.AsObject> {
|
||||
const req = new ListMyMembershipsRequest();
|
||||
@@ -384,92 +397,87 @@ export class GrpcAuthService {
|
||||
req.setQueriesList(queryList);
|
||||
}
|
||||
req.setQuery(metadata);
|
||||
return this.grpcService.auth.listMyMemberships(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyMemberships(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getMyEmail(): Promise<GetMyEmailResponse.AsObject> {
|
||||
const req = new GetMyEmailRequest();
|
||||
return this.grpcService.auth.getMyEmail(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.getMyEmail(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public setMyEmail(email: string): Promise<SetMyEmailResponse.AsObject> {
|
||||
const req = new SetMyEmailRequest();
|
||||
req.setEmail(email);
|
||||
return this.grpcService.auth.setMyEmail(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.setMyEmail(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public resendMyEmailVerification(): Promise<ResendMyEmailVerificationResponse.AsObject> {
|
||||
const req = new ResendMyEmailVerificationRequest();
|
||||
return this.grpcService.auth.resendMyEmailVerification(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.resendMyEmailVerification(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getSupportedLanguages(): Promise<GetSupportedLanguagesResponse.AsObject> {
|
||||
const req = new GetSupportedLanguagesRequest();
|
||||
return this.grpcService.auth.getSupportedLanguages(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyPhone(): Promise<RemoveMyPhoneResponse.AsObject> {
|
||||
return this.grpcService.auth.removeMyPhone(
|
||||
new RemoveMyPhoneRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.removeMyPhone(new RemoveMyPhoneRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateMyUserName(username: string): Promise<UpdateMyUserNameResponse.AsObject> {
|
||||
const req = new UpdateMyUserNameRequest();
|
||||
req.setUserName(username);
|
||||
return this.grpcService.auth.updateMyUserName(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.updateMyUserName(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyZitadelPermissions(): Promise<ListMyZitadelPermissionsResponse.AsObject> {
|
||||
return this.grpcService.auth.listMyZitadelPermissions(
|
||||
new ListMyZitadelPermissionsRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth
|
||||
.listMyZitadelPermissions(new ListMyZitadelPermissionsRequest(), null)
|
||||
.then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyZitadelFeatures(): Promise<ListMyZitadelFeaturesResponse.AsObject> {
|
||||
return this.grpcService.auth.listMyZitadelFeatures(
|
||||
new ListMyZitadelFeaturesRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth
|
||||
.listMyZitadelFeatures(new ListMyZitadelFeaturesRequest(), null)
|
||||
.then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public getMyPhone(): Promise<GetMyPhoneResponse.AsObject> {
|
||||
return this.grpcService.auth.getMyPhone(
|
||||
new GetMyPhoneRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.getMyPhone(new GetMyPhoneRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public setMyPhone(phone: string): Promise<SetMyPhoneResponse.AsObject> {
|
||||
const req = new SetMyPhoneRequest();
|
||||
req.setPhone(phone);
|
||||
return this.grpcService.auth.setMyPhone(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.setMyPhone(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public resendMyPhoneVerification(): Promise<ResendMyPhoneVerificationResponse.AsObject> {
|
||||
const req = new ResendMyPhoneVerificationRequest();
|
||||
return this.grpcService.auth.resendMyPhoneVerification(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.resendMyPhoneVerification(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateMyPassword(oldPassword: string, newPassword: string): Promise<UpdateMyPasswordResponse.AsObject> {
|
||||
const req = new UpdateMyPasswordRequest();
|
||||
req.setOldPassword(oldPassword);
|
||||
req.setNewPassword(newPassword);
|
||||
return this.grpcService.auth.updateMyPassword(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.updateMyPassword(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyLinkedIDP(
|
||||
idpId: string,
|
||||
linkedUserId: string,
|
||||
): Promise<RemoveMyLinkedIDPResponse.AsObject> {
|
||||
public removeMyLinkedIDP(idpId: string, linkedUserId: string): Promise<RemoveMyLinkedIDPResponse.AsObject> {
|
||||
const req = new RemoveMyLinkedIDPRequest();
|
||||
req.setLinkedUserId(linkedUserId);
|
||||
req.setIdpId(idpId);
|
||||
return this.grpcService.auth.removeMyLinkedIDP(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.removeMyLinkedIDP(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyAvatar(): Promise<RemoveMyAvatarResponse.AsObject> {
|
||||
const req = new RemoveMyAvatarRequest();
|
||||
return this.grpcService.auth.removeMyAvatar(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.removeMyAvatar(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyLinkedIDPs(
|
||||
limit: number,
|
||||
offset: number,
|
||||
): Promise<ListMyLinkedIDPsResponse.AsObject> {
|
||||
public listMyLinkedIDPs(limit: number, offset: number): Promise<ListMyLinkedIDPsResponse.AsObject> {
|
||||
const req = new ListMyLinkedIDPsRequest();
|
||||
const metadata = new ListQuery();
|
||||
if (limit) {
|
||||
@@ -479,25 +487,21 @@ export class GrpcAuthService {
|
||||
metadata.setOffset(offset);
|
||||
}
|
||||
req.setQuery(metadata);
|
||||
return this.grpcService.auth.listMyLinkedIDPs(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyLinkedIDPs(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addMyMultiFactorOTP(): Promise<AddMyAuthFactorOTPResponse.AsObject> {
|
||||
return this.grpcService.auth.addMyAuthFactorOTP(
|
||||
new AddMyAuthFactorOTPRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.addMyAuthFactorOTP(new AddMyAuthFactorOTPRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addMyMultiFactorU2F(): Promise<AddMyAuthFactorU2FResponse.AsObject> {
|
||||
return this.grpcService.auth.addMyAuthFactorU2F(
|
||||
new AddMyAuthFactorU2FRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.addMyAuthFactorU2F(new AddMyAuthFactorU2FRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyMultiFactorU2F(tokenId: string): Promise<RemoveMyAuthFactorU2FResponse.AsObject> {
|
||||
const req = new RemoveMyAuthFactorU2FRequest();
|
||||
req.setTokenId(tokenId);
|
||||
return this.grpcService.auth.removeMyAuthFactorU2F(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.removeMyAuthFactorU2F(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public verifyMyMultiFactorU2F(credential: string, tokenname: string): Promise<VerifyMyAuthFactorU2FResponse.AsObject> {
|
||||
@@ -507,25 +511,21 @@ export class GrpcAuthService {
|
||||
verification.setTokenName(tokenname);
|
||||
req.setVerification(verification);
|
||||
|
||||
return this.grpcService.auth.verifyMyAuthFactorU2F(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.verifyMyAuthFactorU2F(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyPasswordless(): Promise<ListMyPasswordlessResponse.AsObject> {
|
||||
return this.grpcService.auth.listMyPasswordless(
|
||||
new ListMyPasswordlessRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyPasswordless(new ListMyPasswordlessRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addMyPasswordless(): Promise<AddMyPasswordlessResponse.AsObject> {
|
||||
return this.grpcService.auth.addMyPasswordless(
|
||||
new AddMyPasswordlessRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.addMyPasswordless(new AddMyPasswordlessRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyPasswordless(tokenId: string): Promise<RemoveMyPasswordlessResponse.AsObject> {
|
||||
const req = new RemoveMyPasswordlessRequest();
|
||||
req.setTokenId(tokenId);
|
||||
return this.grpcService.auth.removeMyPasswordless(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.removeMyPasswordless(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public verifyMyPasswordless(credential: string, tokenname: string): Promise<VerifyMyPasswordlessResponse.AsObject> {
|
||||
@@ -535,37 +535,35 @@ export class GrpcAuthService {
|
||||
verification.setPublicKeyCredential(credential);
|
||||
req.setVerification(verification);
|
||||
|
||||
return this.grpcService.auth.verifyMyPasswordless(
|
||||
req, null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.verifyMyPasswordless(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public sendMyPasswordlessLink(): Promise<SendMyPasswordlessLinkResponse.AsObject> {
|
||||
const req = new SendMyPasswordlessLinkRequest();
|
||||
return this.grpcService.auth.sendMyPasswordlessLink(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.sendMyPasswordlessLink(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addMyPasswordlessLink(): Promise<AddMyPasswordlessLinkResponse.AsObject> {
|
||||
const req = new AddMyPasswordlessLinkRequest();
|
||||
return this.grpcService.auth.addMyPasswordlessLink(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.addMyPasswordlessLink(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeMyMultiFactorOTP(): Promise<RemoveMyAuthFactorOTPResponse.AsObject> {
|
||||
return this.grpcService.auth.removeMyAuthFactorOTP(
|
||||
new RemoveMyAuthFactorOTPRequest(), null,
|
||||
).then(resp => resp.toObject());
|
||||
return this.grpcService.auth
|
||||
.removeMyAuthFactorOTP(new RemoveMyAuthFactorOTPRequest(), null)
|
||||
.then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public verifyMyMultiFactorOTP(code: string): Promise<VerifyMyAuthFactorOTPResponse.AsObject> {
|
||||
const req = new VerifyMyAuthFactorOTPRequest();
|
||||
req.setCode(code);
|
||||
return this.grpcService.auth.verifyMyAuthFactorOTP(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.verifyMyAuthFactorOTP(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public verifyMyPhone(code: string): Promise<VerifyMyPhoneResponse.AsObject> {
|
||||
const req = new VerifyMyPhoneRequest();
|
||||
req.setCode(code);
|
||||
return this.grpcService.auth.verifyMyPhone(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.verifyMyPhone(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listMyUserChanges(limit: number, sequence: number): Promise<ListMyUserChangesResponse.AsObject> {
|
||||
@@ -579,6 +577,6 @@ export class GrpcAuthService {
|
||||
query.setSequence(sequence);
|
||||
}
|
||||
req.setQuery(query);
|
||||
return this.grpcService.auth.listMyUserChanges(req, null).then(resp => resp.toObject());
|
||||
return this.grpcService.auth.listMyUserChanges(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
}
|
||||
|
@@ -754,7 +754,9 @@
|
||||
},
|
||||
"PRIVATELABELING_POLICY": {
|
||||
"TITLE": "Private Labeling",
|
||||
"DESCRIPTION": "Definiere das Erscheinungsbild des Logins."
|
||||
"BTN":"Datei auswählen",
|
||||
"DESCRIPTION": "Definiere das Erscheinungsbild des Logins.",
|
||||
"ACTIVATEPREVIEW":"Preview aktivieren"
|
||||
},
|
||||
"LOGIN_POLICY": {
|
||||
"TITLE": "Login Richtlinien",
|
||||
@@ -1300,6 +1302,7 @@
|
||||
}
|
||||
},
|
||||
"NEXTSTEPS": {
|
||||
"TITLE": "Nächste Schritte",
|
||||
"0": {
|
||||
"TITLE": "Rollen festlegen",
|
||||
"DESC": "Erfassen Sie Rollen für ihr Projekt"
|
||||
@@ -1388,7 +1391,7 @@
|
||||
"TOKENTYPE": "Auth Token Typ",
|
||||
"TOKENTYPE0": "Bearer Token",
|
||||
"TOKENTYPE1": "JWT",
|
||||
"UNSECUREREDIRECT": "Ich hoffe, Du weisst, was Du tust.",
|
||||
"UNSECUREREDIRECT": "Wir hoffen, Du weisst, was Du tust.",
|
||||
"OVERVIEWSECTION": "Übersicht",
|
||||
"OVERVIEWTITLE": "Deine Konfiguration ist bereit. Du kannst sie hier nochmals prüfen.",
|
||||
"ACCESSTOKENROLEASSERTION": "Benutzerrollen dem Access Token hinzufügen",
|
||||
@@ -1480,6 +1483,7 @@
|
||||
},
|
||||
"LANGUAGES": {
|
||||
"de": "Deutsch",
|
||||
"it": "Italienisch",
|
||||
"en": "Englisch"
|
||||
},
|
||||
"MEMBER": {
|
||||
|
@@ -35,7 +35,7 @@
|
||||
"SECURITYANDPRIVACY_DESC": "Manage Your Information and Security Settings",
|
||||
"SECURITYANDPRIVACY_BUTTON": "Personalise Information and Security",
|
||||
"CHANGE_PWD": "Change Password",
|
||||
"PROTECTION": "Organisational Policies",
|
||||
"PROTECTION": "Organizational Policies",
|
||||
"PROTECTION_DESC": "Manage your organisational guidelines. Explore some pre-packaged solutions that save you time and ensure security.",
|
||||
"PROTECTION_BUTTON": "Explore",
|
||||
"PROJECTS": "Create and Manage Your Applications and Projects",
|
||||
@@ -301,8 +301,8 @@
|
||||
"EXTERNALIDP": {
|
||||
"TITLE": "External Identity Providers",
|
||||
"DESC": "",
|
||||
"IDPCONFIGID": "Idp Config ID",
|
||||
"IDPNAME": "Idp Name",
|
||||
"IDPCONFIGID": "IDP Config ID",
|
||||
"IDPNAME": "IDP Name",
|
||||
"USERDISPLAYNAME": "External Name",
|
||||
"EXTERNALUSERID": "External User ID",
|
||||
"DIALOG": {
|
||||
@@ -331,7 +331,7 @@
|
||||
"STATE2": "Inactive",
|
||||
"STATE3": "Deleted",
|
||||
"STATE4": "Locked",
|
||||
"STATE5": "Supend",
|
||||
"STATE5": "Suspended",
|
||||
"STATE6": "Initial"
|
||||
},
|
||||
"PROFILE": {
|
||||
@@ -356,7 +356,7 @@
|
||||
"CURRENT":"Current Picture",
|
||||
"PREVIEW":"Preview",
|
||||
"DELETESUCCESS":"Deleted successfully!",
|
||||
"CROPPERERROR":"An error while uploading your file failed. Try a different format and size if necessary."
|
||||
"CROPPERERROR":"An error while uploading your file occurred. Try a different format and size if necessary."
|
||||
}
|
||||
},
|
||||
"MACHINE": {
|
||||
@@ -595,7 +595,7 @@
|
||||
"VERIFICATION_VALIDATION_ONGOING": "A verification token has already been requested. Click on the button to trigger a verification check.",
|
||||
"VERIFICATION_VALIDATION_ONGOING_TYPE": "Type of the token:",
|
||||
"VERIFICATION_SUCCESSFUL": "Domain successfully verified!",
|
||||
"REQUESTNEWTOKEN": "Request new Token",
|
||||
"REQUESTNEWTOKEN": "Request new token",
|
||||
"TYPES": {
|
||||
"1": "HTTP",
|
||||
"2": "DNS"
|
||||
@@ -659,7 +659,7 @@
|
||||
"POSTAL_CODE": "Postal Code",
|
||||
"COUNTRY": "Country",
|
||||
"TITLE": "Zitadel Tier",
|
||||
"DESCRIPTION": "Zitadel works with Stripe to simplify invoicing. The following link redirects to Stripe.com.",
|
||||
"DESCRIPTION": "Zitadel works with Stripe to simplify invoicing. The following link redirects to stripe.com.",
|
||||
"QUESTIONS": "For questions regarding payments contact our support ",
|
||||
"BTN": "Change Tier"
|
||||
},
|
||||
@@ -716,7 +716,7 @@
|
||||
"BTN":"Select File",
|
||||
"ACTIVATEPREVIEW":"Apply configuration",
|
||||
"DARK":"Dark Mode",
|
||||
"LIGHT":"Lighg Mode",
|
||||
"LIGHT":"Light Mode",
|
||||
"CHANGEVIEW":"Change View",
|
||||
"ACTIVATED":"Policy changes are now LIVE",
|
||||
"THEME":"Theme",
|
||||
@@ -1483,6 +1483,7 @@
|
||||
},
|
||||
"LANGUAGES": {
|
||||
"de": "German",
|
||||
"it": "Italian",
|
||||
"en": "English"
|
||||
},
|
||||
"MEMBER": {
|
||||
|
1546
console/src/assets/i18n/it.json
Normal file
1546
console/src/assets/i18n/it.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user