diff --git a/models/setting/src/index.ts b/models/setting/src/index.ts index 4a9e817d12..12c9946226 100644 --- a/models/setting/src/index.ts +++ b/models/setting/src/index.ts @@ -709,6 +709,10 @@ export function createModel (builder: Builder): void { presenter: setting.component.PermissionPresenter }) + builder.mixin(core.class.AttributePermission, core.class.Class, view.mixin.ObjectPresenter, { + presenter: setting.component.AttributePermissionPresenter + }) + builder.createDoc(core.class.DomainIndexConfiguration, core.space.Model, { domain: DOMAIN_SETTING, disabled: [{ modifiedOn: 1 }, { modifiedBy: 1 }, { createdOn: 1 }, { space: 1 }] diff --git a/plugins/card-resources/src/components/settings/EditRole.svelte b/plugins/card-resources/src/components/settings/EditRole.svelte index 6f8f66967e..9524a2b0ff 100644 --- a/plugins/card-resources/src/components/settings/EditRole.svelte +++ b/plugins/card-resources/src/components/settings/EditRole.svelte @@ -14,7 +14,7 @@ --> {#if role !== undefined} @@ -223,6 +237,7 @@ {#if permissions.length > 0}
{#each permissions as permission} + {@const extraLabel = getAttributePermissionLabel(permission)}
{#if permission.icon !== undefined}
@@ -232,13 +247,10 @@
- - {#if permission.description !== undefined} -
-
- {/if}
{/each}
diff --git a/plugins/setting-resources/src/components/presenters/AttributePermissionPresenter.svelte b/plugins/setting-resources/src/components/presenters/AttributePermissionPresenter.svelte new file mode 100644 index 0000000000..0103fee787 --- /dev/null +++ b/plugins/setting-resources/src/components/presenters/AttributePermissionPresenter.svelte @@ -0,0 +1,35 @@ + + + +{#if value} +
+
+{/if} diff --git a/plugins/setting-resources/src/index.ts b/plugins/setting-resources/src/index.ts index 8bed918682..53cf90a110 100644 --- a/plugins/setting-resources/src/index.ts +++ b/plugins/setting-resources/src/index.ts @@ -37,6 +37,7 @@ import ClassAttributesList from './components/ClassAttributesList.svelte' import Configure from './components/Configure.svelte' import InviteSetting from './components/InviteSetting.svelte' import PermissionPresenter from './components/presenters/PermissionPresenter.svelte' +import AttributePermissionPresenter from './components/presenters/AttributePermissionPresenter.svelte' import SpaceTypeDescriptorPresenter from './components/presenters/SpaceTypeDescriptorPresenter.svelte' import Spaces from './components/Spaces.svelte' import SpaceTypeGeneralSectionEditor from './components/spaceTypes/editor/SpaceTypeGeneralSectionEditor.svelte' @@ -141,6 +142,7 @@ export default async (): Promise => ({ ManageSpaceTypesTools, ManageSpaceTypeContent, PermissionPresenter, + AttributePermissionPresenter, SpaceTypeDescriptorPresenter, SpaceTypeGeneralSectionEditor, SpaceTypePropertiesSectionEditor, diff --git a/plugins/setting/src/index.ts b/plugins/setting/src/index.ts index a1d544205d..132a3f6a37 100644 --- a/plugins/setting/src/index.ts +++ b/plugins/setting/src/index.ts @@ -189,6 +189,7 @@ export default plugin(settingId, { Terms: '' as AnyComponent, ClassSetting: '' as AnyComponent, PermissionPresenter: '' as AnyComponent, + AttributePermissionPresenter: '' as AnyComponent, SpaceTypeDescriptorPresenter: '' as AnyComponent, SpaceTypeGeneralSectionEditor: '' as AnyComponent, SpaceTypePropertiesSectionEditor: '' as AnyComponent, diff --git a/plugins/view-assets/lang/cs.json b/plugins/view-assets/lang/cs.json index 2de4937a23..1fb0ad5b9a 100644 --- a/plugins/view-assets/lang/cs.json +++ b/plugins/view-assets/lang/cs.json @@ -151,7 +151,7 @@ "CopyLink": "Kopírovat odkaz", "ValueIsSet": "Hodnota je nastavena", "RoleLabel": "Role: {role}", - "ForbidAttributeChanges": "Zakázat změny atributů", - "AllowAttributeChanges": "Povolit změny atributů" + "ForbidAttributeChanges": "Zakázat změny: ", + "AllowAttributeChanges": "Povolit změny: " } } diff --git a/plugins/view-assets/lang/de.json b/plugins/view-assets/lang/de.json index 0762fa7b59..e7e0e31000 100644 --- a/plugins/view-assets/lang/de.json +++ b/plugins/view-assets/lang/de.json @@ -151,7 +151,7 @@ "CopyLink": "Link kopieren", "ValueIsSet": "Wert ist gesetzt", "RoleLabel": "Rolle: {role}", - "ForbidAttributeChanges": "Attributänderungen verbieten", - "AllowAttributeChanges": "Attributänderungen erlauben" + "ForbidAttributeChanges": "Änderungen verbieten: ", + "AllowAttributeChanges": "Änderungen erlauben: " } } diff --git a/plugins/view-assets/lang/en.json b/plugins/view-assets/lang/en.json index 1f4d465c49..7f25838907 100644 --- a/plugins/view-assets/lang/en.json +++ b/plugins/view-assets/lang/en.json @@ -151,7 +151,7 @@ "CopyLink": "Copy link", "ValueIsSet": "Value is set", "RoleLabel": "Role: {role}", - "ForbidAttributeChanges": "Forbid attribute changes", - "AllowAttributeChanges": "Allow attribute changes" + "ForbidAttributeChanges": "Forbid changes: ", + "AllowAttributeChanges": "Allow changes: " } } diff --git a/plugins/view-assets/lang/es.json b/plugins/view-assets/lang/es.json index e9ac5f8d68..06340c4769 100644 --- a/plugins/view-assets/lang/es.json +++ b/plugins/view-assets/lang/es.json @@ -146,7 +146,7 @@ "CopyLink": "Copiar enlace", "ValueIsSet": "El valor está establecido", "RoleLabel": "Role: {role}", - "ForbidAttributeChanges": "Prohibir cambios de atributo", - "AllowAttributeChanges": "Permitir cambios de atributo" + "ForbidAttributeChanges": "Prohibir cambios: ", + "AllowAttributeChanges": "Permitir cambios: " } } diff --git a/plugins/view-assets/lang/fr.json b/plugins/view-assets/lang/fr.json index 42272ff4a7..13efeac32b 100644 --- a/plugins/view-assets/lang/fr.json +++ b/plugins/view-assets/lang/fr.json @@ -146,7 +146,7 @@ "CopyLink": "Copier le lien", "ValueIsSet": "La valeur est définie", "RoleLabel": "Rôle : {role}", - "ForbidAttributeChanges": "Interdire les modifications d'attributs", - "AllowAttributeChanges": "Autoriser les modifications d'attributs" + "ForbidAttributeChanges": "Interdire les modifications: ", + "AllowAttributeChanges": "Autoriser les modifications: " } } diff --git a/plugins/view-assets/lang/it.json b/plugins/view-assets/lang/it.json index 6c994ba61b..274d5447fd 100644 --- a/plugins/view-assets/lang/it.json +++ b/plugins/view-assets/lang/it.json @@ -146,7 +146,7 @@ "CopyLink": "Copia link", "ValueIsSet": "Il valore è impostato", "RoleLabel": "Ruolo: {role}", - "ForbidAttributeChanges": "Vieta modifiche attributo", - "AllowAttributeChanges": "Consenti modifiche attributo" + "ForbidAttributeChanges": "Vieta modifiche: ", + "AllowAttributeChanges": "Consenti modifiche: " } } diff --git a/plugins/view-assets/lang/ja.json b/plugins/view-assets/lang/ja.json index df1ed64d92..66ab70464c 100644 --- a/plugins/view-assets/lang/ja.json +++ b/plugins/view-assets/lang/ja.json @@ -146,7 +146,7 @@ "CopyLink": "リンクをコピー", "ValueIsSet": "値が設定されています", "RoleLabel": "役割: {role}", - "ForbidAttributeChanges": "属性の変更を禁止", - "AllowAttributeChanges": "属性の変更を許可" + "ForbidAttributeChanges": "属性の変更を禁止: ", + "AllowAttributeChanges": "属性の変更を許可: " } } diff --git a/plugins/view-assets/lang/pt.json b/plugins/view-assets/lang/pt.json index 3b515f916e..322f4fbce2 100644 --- a/plugins/view-assets/lang/pt.json +++ b/plugins/view-assets/lang/pt.json @@ -146,7 +146,7 @@ "CopyLink": "Copiar link", "ValueIsSet": "O valor está definido", "RoleLabel": "Cargo: {role}", - "ForbidAttributeChanges": "Proibir alterações de atributo", - "AllowAttributeChanges": "Permitir alterações de atributo" + "ForbidAttributeChanges": "Proibir alterações: ", + "AllowAttributeChanges": "Permitir alterações: " } } diff --git a/plugins/view-assets/lang/ru.json b/plugins/view-assets/lang/ru.json index 3bcb55014a..1fa220687c 100644 --- a/plugins/view-assets/lang/ru.json +++ b/plugins/view-assets/lang/ru.json @@ -148,7 +148,7 @@ "CopyLink": "Скопировать ссылку", "ValueIsSet": "Значение установлено", "RoleLabel": "Роль: {role}", - "ForbidAttributeChanges": "Запретить изменения атрибутов", - "AllowAttributeChanges": "Разрешить изменения атрибутов" + "ForbidAttributeChanges": "Запретить изменение: ", + "AllowAttributeChanges": "Разрешить изменение: " } } diff --git a/plugins/view-assets/lang/tr.json b/plugins/view-assets/lang/tr.json index 5fd9e422e4..aa5d7f40c6 100644 --- a/plugins/view-assets/lang/tr.json +++ b/plugins/view-assets/lang/tr.json @@ -146,7 +146,7 @@ "CopyLink": "Bağlantıyı kopyala", "ValueIsSet": "Değer ayarlandı", "RoleLabel": "Rol: {role}", - "ForbidAttributeChanges": "Özellik değişikliklerini yasakla", - "AllowAttributeChanges": "Özellik değişikliklerine izin ver" + "ForbidAttributeChanges": "Özellik yasakla: ", + "AllowAttributeChanges": "Özellik izin ver: " } } diff --git a/plugins/view-assets/lang/zh.json b/plugins/view-assets/lang/zh.json index bddbd974dc..718a943ce3 100644 --- a/plugins/view-assets/lang/zh.json +++ b/plugins/view-assets/lang/zh.json @@ -151,7 +151,7 @@ "CopyLink": "复制链接", "ValueIsSet": "值已设置", "RoleLabel": "角色:{role}", - "ForbidAttributeChanges": "禁止属性更改", - "AllowAttributeChanges": "允许属性更改" + "ForbidAttributeChanges": "禁止更改属性: ", + "AllowAttributeChanges": "允许更改属性: " } }