summaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-11-08 21:48:09 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-11-08 21:49:26 +0100
commita106b7b7be30008ad9f30fd72478f721128fc854 (patch)
treecf53ca3f3c8ec2107874b2fec408bdab68c9ad40 /apps/settings/src
parent1acc7c04684a05f024f4c83a8665d4732c2fc5f6 (diff)
downloadnextcloud-server-a106b7b7be30008ad9f30fd72478f721128fc854.tar.gz
nextcloud-server-a106b7b7be30008ad9f30fd72478f721128fc854.zip
fix(settings): Pass user object to user row actions
This is required as otherwise the action has no information on which user it was called Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/Users/UserRow.vue1
-rw-r--r--apps/settings/src/components/Users/UserRowActions.vue12
2 files changed, 11 insertions, 2 deletions
diff --git a/apps/settings/src/components/Users/UserRow.vue b/apps/settings/src/components/Users/UserRow.vue
index 15995d2e4e7..2d03783b53f 100644
--- a/apps/settings/src/components/Users/UserRow.vue
+++ b/apps/settings/src/components/Users/UserRow.vue
@@ -288,6 +288,7 @@
:actions="userActions"
:disabled="isLoadingField"
:edit="editing"
+ :user="user"
@update:edit="toggleEdit" />
</td>
</tr>
diff --git a/apps/settings/src/components/Users/UserRowActions.vue b/apps/settings/src/components/Users/UserRowActions.vue
index 61134367bf6..fc7881aba6a 100644
--- a/apps/settings/src/components/Users/UserRowActions.vue
+++ b/apps/settings/src/components/Users/UserRowActions.vue
@@ -38,7 +38,7 @@
:disabled="disabled"
:aria-label="text"
:icon="icon"
- @click="action">
+ @click="(event) => action(event, { ...user })">
{{ text }}
</NcActionButton>
</NcActions>
@@ -54,7 +54,7 @@ import SvgCheck from '@mdi/svg/svg/check.svg?raw'
import SvgPencil from '@mdi/svg/svg/pencil.svg?raw'
interface UserAction {
- action: (event: MouseEvent) => void,
+ action: (event: MouseEvent, user: Record<string, unknown>) => void,
icon: string,
text: string
}
@@ -90,6 +90,14 @@ export default defineComponent({
type: Boolean,
required: true,
},
+
+ /**
+ * Target of this actions
+ */
+ user: {
+ type: Object,
+ required: true,
+ },
},
computed: {