mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-14 01:45:12 +00:00
fix: remove old feature references in console (#3567)
* feat: permit all features to every instance and organisation * remove old references in console
This commit is contained in:
@@ -6,7 +6,6 @@ import { ActionKeysType } from 'src/app/modules/action-keys/action-keys.componen
|
||||
import { InfoSectionType } from 'src/app/modules/info-section/info-section.component';
|
||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||
import { Action, ActionState, Flow, FlowType, TriggerType } from 'src/app/proto/generated/zitadel/action_pb';
|
||||
import { ActionsAllowed } from 'src/app/proto/generated/zitadel/features_pb';
|
||||
import { SetTriggerActionsRequest } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
@@ -51,17 +50,6 @@ export class ActionsComponent {
|
||||
};
|
||||
breadcrumbService.setBreadcrumb([iambread, bread]);
|
||||
|
||||
this.mgmtService.getFeatures().then((featuresResp) => {
|
||||
if (featuresResp && featuresResp.features) {
|
||||
const features = featuresResp.features;
|
||||
this.maxActions =
|
||||
features && features.actionsAllowed === ActionsAllowed.ACTIONS_ALLOWED_MAX
|
||||
? features.maxActions
|
||||
: features.actionsAllowed === ActionsAllowed.ACTIONS_ALLOWED_MAX
|
||||
? null
|
||||
: 0;
|
||||
}
|
||||
});
|
||||
this.loadFlow();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import { BehaviorSubject, from, Observable, of } from 'rxjs';
|
||||
import { catchError, finalize, map } from 'rxjs/operators';
|
||||
import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component';
|
||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||
import { Features } from 'src/app/proto/generated/zitadel/features_pb';
|
||||
import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
||||
import { User } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { AdminService } from 'src/app/services/admin.service';
|
||||
@@ -24,8 +23,6 @@ export class IamComponent {
|
||||
public totalMemberResult: number = 0;
|
||||
public membersSubject: BehaviorSubject<Member.AsObject[]> = new BehaviorSubject<Member.AsObject[]>([]);
|
||||
|
||||
public features!: Features.AsObject;
|
||||
|
||||
constructor(
|
||||
public adminService: AdminService,
|
||||
private dialog: MatDialog,
|
||||
@@ -34,8 +31,6 @@ export class IamComponent {
|
||||
private router: Router,
|
||||
) {
|
||||
this.loadMembers();
|
||||
this.loadFeatures();
|
||||
this.adminService.getDefaultFeatures();
|
||||
|
||||
const breadcrumbs = [
|
||||
new Breadcrumb({
|
||||
@@ -106,13 +101,4 @@ export class IamComponent {
|
||||
public showDetail(): void {
|
||||
this.router.navigate(['/system', 'members']);
|
||||
}
|
||||
|
||||
public loadFeatures(): void {
|
||||
this.loadingSubject.next(true);
|
||||
this.adminService.getDefaultFeatures().then((resp) => {
|
||||
if (resp.features) {
|
||||
this.features = resp.features;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import { catchError, finalize, map } from 'rxjs/operators';
|
||||
import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component';
|
||||
import { ChangeType } from 'src/app/modules/changes/changes.component';
|
||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||
import { Features } from 'src/app/proto/generated/zitadel/features_pb';
|
||||
import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
||||
import { Org, OrgState } from 'src/app/proto/generated/zitadel/org_pb';
|
||||
import { User } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
@@ -31,7 +30,6 @@ export class OrgDetailComponent implements OnInit {
|
||||
public loading$: Observable<boolean> = this.loadingSubject.asObservable();
|
||||
public totalMemberResult: number = 0;
|
||||
public membersSubject: BehaviorSubject<Member.AsObject[]> = new BehaviorSubject<Member.AsObject[]>([]);
|
||||
public features!: Features.AsObject;
|
||||
|
||||
constructor(
|
||||
private dialog: MatDialog,
|
||||
@@ -68,7 +66,6 @@ export class OrgDetailComponent implements OnInit {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
this.loadMembers();
|
||||
this.loadFeatures();
|
||||
}
|
||||
|
||||
public openAddMember(): void {
|
||||
@@ -131,18 +128,4 @@ export class OrgDetailComponent implements OnInit {
|
||||
this.membersSubject.next(members);
|
||||
});
|
||||
}
|
||||
|
||||
public loadFeatures(): void {
|
||||
this.loadingSubject.next(true);
|
||||
this.mgmtService
|
||||
.getFeatures()
|
||||
.then((resp) => {
|
||||
if (resp.features) {
|
||||
this.features = resp.features;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
public InfoSectionType: any = InfoSectionType;
|
||||
public copied: string = '';
|
||||
|
||||
public settingsList: SidenavSetting[] = [{ id: 'configuration', i18nKey: 'APP.CONFIGURATION', featureRequired: false }];
|
||||
public settingsList: SidenavSetting[] = [{ id: 'configuration', i18nKey: 'APP.CONFIGURATION' }];
|
||||
public currentSetting: string | undefined = this.settingsList[0].id;
|
||||
|
||||
constructor(
|
||||
@@ -281,10 +281,10 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.getAuthMethodOptions('OIDC');
|
||||
|
||||
this.settingsList = [
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION', featureRequired: false },
|
||||
{ id: 'redirect-uris', i18nKey: 'APP.OIDC.REDIRECTSECTIONTITLE', featureRequired: false },
|
||||
{ id: 'additional-origins', i18nKey: 'APP.ADDITIONALORIGINS', featureRequired: false },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS', featureRequired: false },
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION' },
|
||||
{ id: 'redirect-uris', i18nKey: 'APP.OIDC.REDIRECTSECTIONTITLE' },
|
||||
{ id: 'additional-origins', i18nKey: 'APP.ADDITIONALORIGINS' },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS' },
|
||||
];
|
||||
|
||||
this.initialAuthMethod = this.authMethodFromPartialConfig({ oidc: this.app.oidcConfig });
|
||||
@@ -302,12 +302,12 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.initialAuthMethod = this.authMethodFromPartialConfig({ api: this.app.apiConfig });
|
||||
|
||||
if (this.initialAuthMethod === 'BASIC') {
|
||||
this.settingsList = [{ id: 'urls', i18nKey: 'APP.URLS', featureRequired: false }];
|
||||
this.settingsList = [{ id: 'urls', i18nKey: 'APP.URLS' }];
|
||||
this.currentSetting = 'urls';
|
||||
} else {
|
||||
this.settingsList = [
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION', featureRequired: false },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS', featureRequired: false },
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION' },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS' },
|
||||
];
|
||||
}
|
||||
this.currentAuthMethod = this.initialAuthMethod;
|
||||
@@ -591,12 +591,12 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.currentAuthMethod = this.authMethodFromPartialConfig(config);
|
||||
|
||||
if (this.currentAuthMethod === 'BASIC') {
|
||||
this.settingsList = [{ id: 'urls', i18nKey: 'APP.URLS', featureRequired: false }];
|
||||
this.settingsList = [{ id: 'urls', i18nKey: 'APP.URLS' }];
|
||||
this.currentSetting = 'urls';
|
||||
} else {
|
||||
this.settingsList = [
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION', featureRequired: false },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS', featureRequired: false },
|
||||
{ id: 'configuration', i18nKey: 'APP.CONFIGURATION' },
|
||||
{ id: 'urls', i18nKey: 'APP.URLS' },
|
||||
];
|
||||
this.currentSetting = 'configuration';
|
||||
}
|
||||
|
||||
+7
-7
@@ -38,13 +38,13 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
public refreshChanges$: EventEmitter<void> = new EventEmitter();
|
||||
|
||||
public settingsList: SidenavSetting[] = [
|
||||
{ id: 'general', i18nKey: 'USER.SETTINGS.GENERAL', featureRequired: false },
|
||||
{ id: 'idp', i18nKey: 'USER.SETTINGS.IDP', featureRequired: false },
|
||||
{ id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS', featureRequired: false },
|
||||
{ id: 'mfa', i18nKey: 'USER.SETTINGS.MFA', featureRequired: false },
|
||||
{ id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS', featureRequired: false },
|
||||
{ id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS', featureRequired: false },
|
||||
{ id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA', featureRequired: ['metadata.user'] },
|
||||
{ id: 'general', i18nKey: 'USER.SETTINGS.GENERAL'},
|
||||
{ id: 'idp', i18nKey: 'USER.SETTINGS.IDP'},
|
||||
{ id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS'},
|
||||
{ id: 'mfa', i18nKey: 'USER.SETTINGS.MFA'},
|
||||
{ id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS'},
|
||||
{ id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS'},
|
||||
{ id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA'},
|
||||
];
|
||||
public currentSetting: string | undefined = this.settingsList[0].id;
|
||||
|
||||
|
||||
@@ -20,15 +20,15 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EditDialogComponent, EditDialogType } from '../auth-user-detail/edit-dialog/edit-dialog.component';
|
||||
import { ResendEmailDialogComponent } from '../auth-user-detail/resend-email-dialog/resend-email-dialog.component';
|
||||
|
||||
const GENERAL: SidenavSetting = { id: 'general', i18nKey: 'USER.SETTINGS.GENERAL', featureRequired: false };
|
||||
const GRANTS: SidenavSetting = { id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS', featureRequired: false };
|
||||
const METADATA: SidenavSetting = { id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA', featureRequired: ['metadata.user'] };
|
||||
const IDP: SidenavSetting = { id: 'idp', i18nKey: 'USER.SETTINGS.IDP', featureRequired: false };
|
||||
const PASSWORDLESS: SidenavSetting = { id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS', featureRequired: false };
|
||||
const MFA: SidenavSetting = { id: 'mfa', i18nKey: 'USER.SETTINGS.MFA', featureRequired: false };
|
||||
const PERSONALACCESSTOKEN: SidenavSetting = { id: 'pat', i18nKey: 'USER.SETTINGS.PAT', featureRequired: false };
|
||||
const KEYS: SidenavSetting = { id: 'keys', i18nKey: 'USER.SETTINGS.KEYS', featureRequired: false };
|
||||
const MEMBERSHIPS: SidenavSetting = { id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS', featureRequired: false };
|
||||
const GENERAL: SidenavSetting = { id: 'general', i18nKey: 'USER.SETTINGS.GENERAL' };
|
||||
const GRANTS: SidenavSetting = { id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS' };
|
||||
const METADATA: SidenavSetting = { id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA'};
|
||||
const IDP: SidenavSetting = { id: 'idp', i18nKey: 'USER.SETTINGS.IDP' };
|
||||
const PASSWORDLESS: SidenavSetting = { id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS' };
|
||||
const MFA: SidenavSetting = { id: 'mfa', i18nKey: 'USER.SETTINGS.MFA'};
|
||||
const PERSONALACCESSTOKEN: SidenavSetting = { id: 'pat', i18nKey: 'USER.SETTINGS.PAT' };
|
||||
const KEYS: SidenavSetting = { id: 'keys', i18nKey: 'USER.SETTINGS.KEYS' };
|
||||
const MEMBERSHIPS: SidenavSetting = { id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS' };
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-user-detail',
|
||||
|
||||
Reference in New Issue
Block a user