mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
35 lines
775 B
JavaScript
35 lines
775 B
JavaScript
import gettext from 'sources/gettext';
|
|
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
|
|
|
export default class PrivilegeSchema extends BaseUISchema {
|
|
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
|
|
super({
|
|
oid: null,
|
|
privilege: [],
|
|
...initValues
|
|
});
|
|
|
|
this.privilegeRoleSchema = getPrivilegeRoleSchema([]);
|
|
this.fieldOptions = {
|
|
...fieldOptions,
|
|
};
|
|
}
|
|
|
|
get idAttribute() {
|
|
return 'oid';
|
|
}
|
|
|
|
get baseFields() {
|
|
return [
|
|
{
|
|
id: 'privilege', label: gettext('Privileges'), type: 'collection',
|
|
schema: this.privilegeRoleSchema,
|
|
uniqueCol: ['grantee'],
|
|
editable: false, mode: ['create'],
|
|
canAdd: true, canDelete: true,
|
|
}
|
|
];
|
|
}
|
|
|
|
}
|