mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 03:37:43 +02:00
EZQMS-729: Restrict spaces operations (#5500)
This commit is contained in:
@@ -128,7 +128,8 @@ export default plugin(settingId, {
|
||||
Owners: '' as Ref<Doc>,
|
||||
InviteSettings: '' as Ref<Doc>,
|
||||
WorkspaceSetting: '' as Ref<Doc>,
|
||||
ManageSpaces: '' as Ref<Doc>
|
||||
ManageSpaces: '' as Ref<Doc>,
|
||||
Spaces: '' as Ref<Doc>
|
||||
},
|
||||
mixin: {
|
||||
Editable: '' as Ref<Mixin<Editable>>,
|
||||
@@ -169,6 +170,7 @@ export default plugin(settingId, {
|
||||
string: {
|
||||
Settings: '' as IntlString,
|
||||
Setting: '' as IntlString,
|
||||
Spaces: '' as IntlString,
|
||||
WorkspaceSettings: '' as IntlString,
|
||||
Branding: '' as IntlString,
|
||||
Integrations: '' as IntlString,
|
||||
@@ -219,7 +221,8 @@ export default plugin(settingId, {
|
||||
Clazz: '' as Asset,
|
||||
Enums: '' as Asset,
|
||||
InviteSettings: '' as Asset,
|
||||
InviteWorkspace: '' as Asset
|
||||
InviteWorkspace: '' as Asset,
|
||||
Views: '' as Asset
|
||||
},
|
||||
templateFieldCategory: {
|
||||
Integration: '' as Ref<TemplateFieldCategory>
|
||||
|
||||
@@ -25,7 +25,8 @@ import core, {
|
||||
Space,
|
||||
SpaceType,
|
||||
TxOperations,
|
||||
TypeAny as TypeAnyType
|
||||
TypeAny as TypeAnyType,
|
||||
getRoleAttributeBaseProps
|
||||
} from '@hcengineering/core'
|
||||
import { TypeAny } from '@hcengineering/model'
|
||||
import { getEmbeddedLabel, IntlString } from '@hcengineering/platform'
|
||||
@@ -74,12 +75,14 @@ export interface RoleAttributeProps {
|
||||
}
|
||||
|
||||
export function getRoleAttributeProps (data: AttachedData<Role>, roleId: Ref<Role>): RoleAttributeProps {
|
||||
const name = data.name.trim()
|
||||
const label = getEmbeddedLabel(`Role: ${name}`)
|
||||
const roleType = TypeAny(setting.component.RoleAssignmentEditor, label, setting.component.RoleAssignmentEditor)
|
||||
const id = `role-${roleId}` as Ref<Attribute<PropertyType>>
|
||||
const baseProps = getRoleAttributeBaseProps(data, roleId)
|
||||
const roleType = TypeAny(
|
||||
setting.component.RoleAssignmentEditor,
|
||||
baseProps.label,
|
||||
setting.component.RoleAssignmentEditor
|
||||
)
|
||||
|
||||
return { label, roleType, id }
|
||||
return { ...baseProps, roleType }
|
||||
}
|
||||
|
||||
export async function createSpaceTypeRole (
|
||||
|
||||
Reference in New Issue
Block a user