@live-change/access-control-frontend 0.9.18 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
availableRoles: {
|
|
74
74
|
type: Array,
|
|
75
|
-
default: () => ['admin', 'moderator', 'writer', 'reader']
|
|
75
|
+
default: () => ['admin', 'owner', 'moderator', 'writer', 'reader']
|
|
76
76
|
},
|
|
77
77
|
availablePublicRoles: {
|
|
78
78
|
type: Array,
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
adminRoles: {
|
|
111
111
|
type: Array,
|
|
112
|
-
default: () => ['admin']
|
|
112
|
+
default: () => ['admin', 'owner']
|
|
113
113
|
}
|
|
114
114
|
})
|
|
115
115
|
|
|
@@ -7,107 +7,122 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
<WorkingZone>
|
|
11
|
+
|
|
12
|
+
<template #default>
|
|
13
|
+
|
|
14
|
+
<TabView :pt="{ panelcontainer:{ class: 'px-1' } }" v-model:activeIndex="tabIndex">
|
|
15
|
+
<TabPanel header="Single user">
|
|
16
|
+
|
|
17
|
+
<command-form service="accessControl" action="inviteEmail"
|
|
18
|
+
ref="inviteForm"
|
|
19
|
+
v-slot="{ data }"
|
|
20
|
+
:parameters="{ objectType, object }"
|
|
21
|
+
:initialValues="{ roles: availableRoles }"
|
|
22
|
+
@done="handleInvited" keepOnDone>
|
|
23
|
+
|
|
24
|
+
<div class="flex flex-row flex-wrap align-items-center" style="margin-left: -0.5rem; margin-right: -0.5rem;">
|
|
25
|
+
<div class="col-12 md:col-6 py-1">
|
|
26
|
+
<div class="p-field mb-3">
|
|
27
|
+
<label for="email" class="block text-900 font-medium mb-2">
|
|
28
|
+
Email address
|
|
29
|
+
</label>
|
|
30
|
+
<InputText id="email" type="text" class="w-full"
|
|
31
|
+
aria-describedby="email-help" :class="{ 'p-invalid': data.emailError }"
|
|
32
|
+
v-model="data.email" />
|
|
33
|
+
<small v-if="data.emailError" id="email-help" class="p-error">{{ t(`errors.${data.emailError}`) }}</small>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="col-12 md:col-6">
|
|
37
|
+
<div class="p-field mb-3">
|
|
38
|
+
<label for="inviteAccess" class="block text-900 font-medium mb-2">
|
|
39
|
+
Roles
|
|
40
|
+
</label>
|
|
41
|
+
<Dropdown v-if="!multiRole" id="inviteAccess" class="w-14em w-full"
|
|
42
|
+
:options="['none'].concat(availableRoles)"
|
|
43
|
+
:optionLabel="optionLabel"
|
|
44
|
+
:modelValue="data.roles?.[0] ?? 'none'"
|
|
45
|
+
@update:modelValue="newValue => data.roles = [newValue]"
|
|
46
|
+
:feedback="false" toggleMask />
|
|
47
|
+
<MultiSelect v-if="multiRole" id="inviteAccess" class="w-full"
|
|
48
|
+
:options="availableRoles"
|
|
49
|
+
:optionLabel="optionLabel"
|
|
50
|
+
v-model="data.roles"
|
|
51
|
+
:feedback="false" toggleMask />
|
|
52
|
+
<small v-if="data.rolesError" id="roles-help" class="p-error">{{ t(`errors.${data.rolesError}`) }}</small>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="p-field mb-1">
|
|
57
|
+
<label for="inviteMessage" class="block text-900 font-medium mb-2">
|
|
58
|
+
Message ( optional )
|
|
25
59
|
</label>
|
|
26
|
-
<
|
|
27
|
-
aria-describedby="email-help" :class="{ 'p-invalid': data.emailError }"
|
|
28
|
-
v-model="data.email" />
|
|
29
|
-
<small v-if="data.emailError" id="email-help" class="p-error">{{ t(`errors.${data.emailError}`) }}</small>
|
|
60
|
+
<Textarea id="inviteMessage" v-model="data.message" :autoResize="true" rows="3" class="w-full" />
|
|
30
61
|
</div>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
62
|
+
|
|
63
|
+
</command-form>
|
|
64
|
+
|
|
65
|
+
</TabPanel>
|
|
66
|
+
<TabPanel header="Multiple users">
|
|
67
|
+
|
|
68
|
+
<command-form service="accessControl" action="inviteManyEmailsFromText"
|
|
69
|
+
ref="inviteManyForm"
|
|
70
|
+
v-slot="{ data }"
|
|
71
|
+
:parameters="{ objectType, object }"
|
|
72
|
+
:initialValues="{ roles: availableRoles }"
|
|
73
|
+
@done="handleInvitedMany" keepOnDone>
|
|
74
|
+
|
|
75
|
+
<div class="p-field mb-3">
|
|
76
|
+
<label for="email" class="block text-900 font-medium mb-2">
|
|
77
|
+
Email addresses (newline or comma separated)
|
|
78
|
+
</label>
|
|
79
|
+
<Textarea id="emailsText" type="text" class="w-full"
|
|
80
|
+
rows="4"
|
|
81
|
+
aria-describedby="emails-help" :class="{ 'p-invalid': data.emailsTextError }"
|
|
82
|
+
v-model="data.emailsText" />
|
|
83
|
+
<small v-if="data.emailsTextError" id="emails-help" class="p-error">
|
|
84
|
+
{{ t(`errors.${data.emailsTextError}`) }}
|
|
85
|
+
</small>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="p-field mb-3">
|
|
88
|
+
<label for="inviteAccess" class="block text-900 font-medium mb-2">
|
|
89
|
+
Roles
|
|
90
|
+
</label>
|
|
91
|
+
<Dropdown v-if="!multiRole" id="inviteAccess" class="w-14em w-full"
|
|
92
|
+
:options="['none'].concat(availableRoles)"
|
|
93
|
+
:optionLabel="optionLabel"
|
|
94
|
+
:modelValue="data.roles?.[0] ?? 'none'"
|
|
95
|
+
@update:modelValue="newValue => data.roles = [newValue]"
|
|
96
|
+
:feedback="false" toggleMask />
|
|
97
|
+
<MultiSelect v-if="multiRole" id="inviteAccess" class="w-full"
|
|
98
|
+
:options="availableRoles"
|
|
99
|
+
:optionLabel="optionLabel"
|
|
100
|
+
v-model="data.roles"
|
|
101
|
+
:feedback="false" toggleMask />
|
|
102
|
+
<small v-if="data.rolesError" id="roles-help" class="p-error">{{ t(`errors.${data.rolesError}`) }}</small>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="p-field mb-1">
|
|
105
|
+
<label for="inviteMessage" class="block text-900 font-medium mb-2">
|
|
106
|
+
Message ( optional )
|
|
36
107
|
</label>
|
|
37
|
-
<
|
|
38
|
-
:options="['none'].concat(availableRoles)"
|
|
39
|
-
:optionLabel="optionLabel"
|
|
40
|
-
:modelValue="data.roles?.[0] ?? 'none'"
|
|
41
|
-
@update:modelValue="newValue => data.roles = [newValue]"
|
|
42
|
-
:feedback="false" toggleMask />
|
|
43
|
-
<MultiSelect v-if="multiRole" id="inviteAccess" class="w-full"
|
|
44
|
-
:options="availableRoles"
|
|
45
|
-
:optionLabel="optionLabel"
|
|
46
|
-
v-model="data.roles"
|
|
47
|
-
:feedback="false" toggleMask />
|
|
48
|
-
<small v-if="data.rolesError" id="roles-help" class="p-error">{{ t(`errors.${data.rolesError}`) }}</small>
|
|
108
|
+
<Textarea id="inviteMessage" v-model="data.message" :autoResize="true" rows="3" class="w-full" />
|
|
49
109
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
v-slot="{ data }"
|
|
67
|
-
:parameters="{ objectType, object }"
|
|
68
|
-
:initialValues="{ roles: availableRoles }"
|
|
69
|
-
@done="handleInvitedMany" keepOnDone>
|
|
70
|
-
|
|
71
|
-
<div class="p-field mb-3">
|
|
72
|
-
<label for="email" class="block text-900 font-medium mb-2">
|
|
73
|
-
Email addresses (newline or comma separated)
|
|
74
|
-
</label>
|
|
75
|
-
<Textarea id="emailsText" type="text" class="w-full"
|
|
76
|
-
rows="4"
|
|
77
|
-
aria-describedby="emails-help" :class="{ 'p-invalid': data.emailsTextError }"
|
|
78
|
-
v-model="data.emailsText" />
|
|
79
|
-
<small v-if="data.emailsTextError" id="emails-help" class="p-error">
|
|
80
|
-
{{ t(`errors.${data.emailsTextError}`) }}
|
|
81
|
-
</small>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="p-field mb-3">
|
|
84
|
-
<label for="inviteAccess" class="block text-900 font-medium mb-2">
|
|
85
|
-
Roles
|
|
86
|
-
</label>
|
|
87
|
-
<Dropdown v-if="!multiRole" id="inviteAccess" class="w-14em w-full"
|
|
88
|
-
:options="['none'].concat(availableRoles)"
|
|
89
|
-
:optionLabel="optionLabel"
|
|
90
|
-
:modelValue="data.roles?.[0] ?? 'none'"
|
|
91
|
-
@update:modelValue="newValue => data.roles = [newValue]"
|
|
92
|
-
:feedback="false" toggleMask />
|
|
93
|
-
<MultiSelect v-if="multiRole" id="inviteAccess" class="w-full"
|
|
94
|
-
:options="availableRoles"
|
|
95
|
-
:optionLabel="optionLabel"
|
|
96
|
-
v-model="data.roles"
|
|
97
|
-
:feedback="false" toggleMask />
|
|
98
|
-
<small v-if="data.rolesError" id="roles-help" class="p-error">{{ t(`errors.${data.rolesError}`) }}</small>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="p-field mb-1">
|
|
101
|
-
<label for="inviteMessage" class="block text-900 font-medium mb-2">
|
|
102
|
-
Message ( optional )
|
|
103
|
-
</label>
|
|
104
|
-
<Textarea id="inviteMessage" v-model="data.message" :autoResize="true" rows="3" class="w-full" />
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
</command-form>
|
|
108
|
-
|
|
109
|
-
</TabPanel>
|
|
110
|
-
</TabView>
|
|
110
|
+
|
|
111
|
+
</command-form>
|
|
112
|
+
|
|
113
|
+
</TabPanel>
|
|
114
|
+
</TabView>
|
|
115
|
+
|
|
116
|
+
</template>
|
|
117
|
+
|
|
118
|
+
<template #working>
|
|
119
|
+
<div class="absolute w-full h-full top-0 left-0 bg-black-alpha-40 z-5
|
|
120
|
+
flex align-items-center justify-content-center">
|
|
121
|
+
<ProgressSpinner animationDuration=".5s"/>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
</WorkingZone>
|
|
111
126
|
|
|
112
127
|
<template #footer>
|
|
113
128
|
<Button v-if="tabIndex === 0"
|
|
@@ -116,6 +131,7 @@
|
|
|
116
131
|
label="Invite emails" icon="pi pi-envelope" autofocus @click="inviteManyForm.submit()" />
|
|
117
132
|
</template>
|
|
118
133
|
|
|
134
|
+
|
|
119
135
|
<TaskModal v-model:visible="taskModalVisible" :task="inviteTask" :taskTypes="taskTypes" />
|
|
120
136
|
|
|
121
137
|
</Dialog>
|
|
@@ -124,6 +140,10 @@
|
|
|
124
140
|
<script setup>
|
|
125
141
|
import { TaskModal } from "@live-change/task-frontend"
|
|
126
142
|
|
|
143
|
+
import { WorkingZone } from "@live-change/vue3-components"
|
|
144
|
+
|
|
145
|
+
import ProgressSpinner from 'primevue/progressspinner'
|
|
146
|
+
|
|
127
147
|
import TabView from 'primevue/tabview'
|
|
128
148
|
import TabPanel from 'primevue/tabpanel'
|
|
129
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/access-control-frontend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.20",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
},
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/access-control-service": "^0.9.
|
|
25
|
-
"@live-change/cli": "^0.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/db-admin": "^0.9.
|
|
30
|
-
"@live-change/framework": "^0.9.
|
|
31
|
-
"@live-change/frontend-base": "^0.9.
|
|
32
|
-
"@live-change/password-authentication-service": "^0.9.
|
|
33
|
-
"@live-change/secret-code-service": "^0.9.
|
|
34
|
-
"@live-change/secret-link-service": "^0.9.
|
|
35
|
-
"@live-change/session-service": "^0.9.
|
|
36
|
-
"@live-change/user-frontend": "^0.9.
|
|
37
|
-
"@live-change/user-service": "^0.9.
|
|
38
|
-
"@live-change/vue3-components": "^0.9.
|
|
39
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
24
|
+
"@live-change/access-control-service": "^0.9.20",
|
|
25
|
+
"@live-change/cli": "^0.9.20",
|
|
26
|
+
"@live-change/dao": "^0.9.20",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.20",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.20",
|
|
29
|
+
"@live-change/db-admin": "^0.9.20",
|
|
30
|
+
"@live-change/framework": "^0.9.20",
|
|
31
|
+
"@live-change/frontend-base": "^0.9.20",
|
|
32
|
+
"@live-change/password-authentication-service": "^0.9.20",
|
|
33
|
+
"@live-change/secret-code-service": "^0.9.20",
|
|
34
|
+
"@live-change/secret-link-service": "^0.9.20",
|
|
35
|
+
"@live-change/session-service": "^0.9.20",
|
|
36
|
+
"@live-change/user-frontend": "^0.9.20",
|
|
37
|
+
"@live-change/user-service": "^0.9.20",
|
|
38
|
+
"@live-change/vue3-components": "^0.9.20",
|
|
39
|
+
"@live-change/vue3-ssr": "^0.9.20",
|
|
40
40
|
"@vueuse/core": "^12.3.0",
|
|
41
41
|
"codeceptjs-assert": "^0.0.5",
|
|
42
42
|
"compression": "^1.7.5",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vue3-scroll-border": "0.1.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
56
|
+
"@live-change/codeceptjs-helper": "^0.9.20",
|
|
57
57
|
"codeceptjs": "^3.6.10",
|
|
58
58
|
"generate-password": "1.7.1",
|
|
59
59
|
"playwright": "1.49.1",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
65
65
|
"license": "BSD-3-Clause",
|
|
66
66
|
"description": "",
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "6524c2dedbb137e95e9aa07eaf9503d68d7b9093"
|
|
68
68
|
}
|