File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 <NcSelectUsers
99 keep-open
1010 :loading =" showLoadingCircle"
11- :disabled =" locked"
11+ :disabled =" locked || !isCurrentUserOwner "
1212 :options =" options"
1313 :placeholder =" t('forms', 'Search for user, group or team …')"
1414 :aria-label-listbox =" t('forms', 'Search for user, group or team …')"
@@ -46,6 +46,11 @@ export default {
4646 type: Boolean ,
4747 required: true ,
4848 },
49+
50+ isCurrentUserOwner: {
51+ type: Boolean ,
52+ required: true ,
53+ },
4954 },
5055
5156 computed: {
Original file line number Diff line number Diff line change 1414 <span >{{ displayName }}</span >
1515 <span >{{ displayNameAppendix }}</span >
1616 </div >
17- <NcActions class =" share-div__actions" >
17+ <NcActions class =" share-div__actions" :disabled = " !isCurrentUserOwner " >
1818 <NcActionCaption :name =" t('forms', 'Permissions')" />
1919 <NcActionCheckbox
2020 :model-value =" canEditForm"
@@ -80,6 +80,11 @@ export default {
8080 type: Boolean ,
8181 required: true ,
8282 },
83+
84+ isCurrentUserOwner: {
85+ type: Boolean ,
86+ required: true ,
87+ },
8388 },
8489
8590 computed: {
Original file line number Diff line number Diff line change 3131 </div >
3232 <span class =" share-div__desc" >{{ t('forms', 'Share link') }}</span >
3333 <NcActions >
34- <NcActionButton :disabled =" locked" @click =" addPublicLink" >
34+ <NcActionButton
35+ :disabled =" locked || !isCurrentUserOwner"
36+ @click =" addPublicLink" >
3537 <template #icon >
3638 <IconPlus :size =" 20" />
3739 </template >
8082 </NcActionButton >
8183 <NcActionButton
8284 v-else
83- :disabled =" locked"
85+ :disabled =" locked || !isCurrentUserOwner "
8486 @click =" makeEmbeddable(share)" >
8587 <template #icon >
8688 <IconLinkBoxVariantOutline :size =" 20" />
8789 </template >
8890 <!-- TRANSLATORS: This means the link can be embedded into external websites -->
8991 {{ t('forms', 'Convert to embeddable link') }}
9092 </NcActionButton >
91- <NcActionButton :disabled =" locked" @click =" removeShare(share)" >
93+ <NcActionButton
94+ :disabled =" locked || !isCurrentUserOwner"
95+ @click =" removeShare(share)" >
9296 <template #icon >
9397 <IconDelete :size =" 20" />
9498 </template >
@@ -274,6 +278,10 @@ export default {
274278 },
275279
276280 computed: {
281+ isCurrentUserOwner () {
282+ return getCurrentUser ().uid === this .form .ownerId
283+ },
284+
277285 sortedShares () {
278286 // Remove Link-Shares, which are handled separately, then sort
279287 return this .form .shares
You can’t perform that action at this time.
0 commit comments