Archived
add securable settings (#22936)
* wip * Update typings * nullable * update test service * support securables * updata test data * fix issues * fix build failure * update test mocks * fix typo * fix reference * fix findobjectdialog issue * update SearchResultItem type * fix table component perf issue * hide effective permission for server role * hide effective permission for app role and db role * vbump sts and fix a couple issues * STS update and UI update * fix user login display issue * vbump sts
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as azdata from 'azdata';
|
||||
import { ObjectManagementDialogBase, ObjectManagementDialogOptions } from './objectManagementDialogBase';
|
||||
import { ObjectManagementDialogOptions } from './objectManagementDialogBase';
|
||||
import { IObjectManagementService, ObjectManagement } from 'mssql';
|
||||
import * as localizedConstants from '../localizedConstants';
|
||||
import { AlterApplicationRoleDocUrl, CreateApplicationRoleDocUrl } from '../constants';
|
||||
import { isValidSQLPassword } from '../utils';
|
||||
import { DefaultMaxTableHeight } from '../../ui/dialogBase';
|
||||
import { DefaultMaxTableRowCount } from '../../ui/dialogBase';
|
||||
import { PrincipalDialogBase } from './principalDialogBase';
|
||||
|
||||
export class ApplicationRoleDialog extends ObjectManagementDialogBase<ObjectManagement.ApplicationRoleInfo, ObjectManagement.ApplicationRoleViewInfo> {
|
||||
export class ApplicationRoleDialog extends PrincipalDialogBase<ObjectManagement.ApplicationRoleInfo, ObjectManagement.ApplicationRoleViewInfo> {
|
||||
// Sections
|
||||
private generalSection: azdata.GroupContainer;
|
||||
private ownedSchemasSection: azdata.GroupContainer;
|
||||
@@ -25,7 +26,7 @@ export class ApplicationRoleDialog extends ObjectManagementDialogBase<ObjectMana
|
||||
private ownedSchemaTable: azdata.TableComponent;
|
||||
|
||||
constructor(objectManagementService: IObjectManagementService, options: ObjectManagementDialogOptions) {
|
||||
super(objectManagementService, options);
|
||||
super(objectManagementService, options, true, false);
|
||||
}
|
||||
|
||||
protected override postInitializeData(): void {
|
||||
@@ -51,10 +52,11 @@ export class ApplicationRoleDialog extends ObjectManagementDialogBase<ObjectMana
|
||||
return errors;
|
||||
}
|
||||
|
||||
protected async initializeUI(): Promise<void> {
|
||||
protected override async initializeUI(): Promise<void> {
|
||||
await super.initializeUI();
|
||||
this.initializeGeneralSection();
|
||||
this.initializeOwnedSchemasSection();
|
||||
this.formContainer.addItems([this.generalSection, this.ownedSchemasSection]);
|
||||
this.formContainer.addItems([this.generalSection, this.ownedSchemasSection, this.securableSection], this.getSectionItemLayout());
|
||||
}
|
||||
|
||||
private initializeGeneralSection(): void {
|
||||
@@ -84,7 +86,7 @@ export class ApplicationRoleDialog extends ObjectManagementDialogBase<ObjectMana
|
||||
[localizedConstants.SchemaText],
|
||||
this.viewInfo.schemas,
|
||||
this.objectInfo.ownedSchemas,
|
||||
DefaultMaxTableHeight,
|
||||
DefaultMaxTableRowCount,
|
||||
(item) => {
|
||||
// It is not allowed to have unassigned schema.
|
||||
return this.objectInfo.ownedSchemas.indexOf(item) === -1;
|
||||
|
||||
Reference in New Issue
Block a user