@live-change/access-control-frontend 0.1.6 → 0.2.2
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.
package/front/src/App.vue
CHANGED
|
@@ -26,10 +26,16 @@
|
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
import { watch } from 'vue'
|
|
29
|
-
import { client as useClient } from '@live-change/vue3-ssr'
|
|
29
|
+
import { client as useClient, useApi } from '@live-change/vue3-ssr'
|
|
30
30
|
const client = useClient()
|
|
31
31
|
watch(client, (newClient, oldClient) => {
|
|
32
32
|
console.log("WATCH CLIENT", oldClient, '=>', newClient)
|
|
33
33
|
})
|
|
34
34
|
|
|
35
|
+
const api = useApi()
|
|
36
|
+
import emailValidator from "@live-change/email-service/clientEmailValidator.js"
|
|
37
|
+
import passwordValidator from "@live-change/password-authentication-service/clientPasswordValidator.js"
|
|
38
|
+
api.validators.email = emailValidator
|
|
39
|
+
api.validators.password = passwordValidator
|
|
40
|
+
|
|
35
41
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<slot v-if="!authorized" name="blocked" :authorized="authorized" :roles="accessRoles" :accesses="accesses">
|
|
2
|
+
<slot v-if="!hidden && !authorized" name="blocked" :authorized="authorized" :roles="accessRoles" :accesses="accesses">
|
|
3
3
|
<div class="flex align-items-start p-4 bg-pink-100 border-round border-1 border-pink-300 mb-4">
|
|
4
4
|
<i class="pi pi-times-circle text-pink-900 text-2xl mr-3" />
|
|
5
5
|
<div class="mr-3">
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</slot>
|
|
13
|
-
<BlockUI :blocked="!authorized">
|
|
13
|
+
<BlockUI v-if="!hidden" :blocked="!authorized">
|
|
14
14
|
<slot :authorized="authorized" :roles="accessRoles" :accesses="accesses"></slot>
|
|
15
15
|
</BlockUI>
|
|
16
|
+
<slot v-if="authorized && hidden" :roles="accessRoles" :accesses="accesses"></slot>
|
|
17
|
+
<slot v-if="!authorized && hidden" name="alternative" :roles="accessRoles" :accesses="accesses"></slot>
|
|
16
18
|
</template>
|
|
17
19
|
|
|
18
20
|
<script setup>
|
|
@@ -36,9 +38,10 @@
|
|
|
36
38
|
type: Array,
|
|
37
39
|
default: () => []
|
|
38
40
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
hidden: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
42
45
|
})
|
|
43
46
|
|
|
44
47
|
const { objectType, object, objects, requiredRoles } = props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/access-control-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
"debug": "node --inspect-brk server"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@live-change/access-control-service": "0.2.
|
|
24
|
-
"@live-change/cli": "0.6.
|
|
25
|
-
"@live-change/dao": "0.5.
|
|
26
|
-
"@live-change/dao-vue3": "0.5.
|
|
27
|
-
"@live-change/dao-websocket": "0.5.
|
|
23
|
+
"@live-change/access-control-service": "0.2.51",
|
|
24
|
+
"@live-change/cli": "0.6.14",
|
|
25
|
+
"@live-change/dao": "0.5.6",
|
|
26
|
+
"@live-change/dao-vue3": "0.5.6",
|
|
27
|
+
"@live-change/dao-websocket": "0.5.6",
|
|
28
28
|
"@live-change/db-admin": "0.5.17",
|
|
29
|
-
"@live-change/framework": "0.6.
|
|
30
|
-
"@live-change/frontend-base": "^0.
|
|
31
|
-
"@live-change/password-authentication-service": "0.2.
|
|
32
|
-
"@live-change/secret-code-service": "0.2.
|
|
33
|
-
"@live-change/secret-link-service": "0.2.
|
|
34
|
-
"@live-change/session-service": "0.2.
|
|
35
|
-
"@live-change/user-frontend": "^0.
|
|
36
|
-
"@live-change/user-service": "0.2.
|
|
37
|
-
"@live-change/vue3-components": "0.2.
|
|
38
|
-
"@live-change/vue3-ssr": "0.2.
|
|
29
|
+
"@live-change/framework": "0.6.14",
|
|
30
|
+
"@live-change/frontend-base": "^0.2.2",
|
|
31
|
+
"@live-change/password-authentication-service": "0.2.51",
|
|
32
|
+
"@live-change/secret-code-service": "0.2.51",
|
|
33
|
+
"@live-change/secret-link-service": "0.2.51",
|
|
34
|
+
"@live-change/session-service": "0.2.51",
|
|
35
|
+
"@live-change/user-frontend": "^0.2.2",
|
|
36
|
+
"@live-change/user-service": "0.2.51",
|
|
37
|
+
"@live-change/vue3-components": "0.2.15",
|
|
38
|
+
"@live-change/vue3-ssr": "0.2.15",
|
|
39
39
|
"@vueuse/core": "^9.1.0",
|
|
40
40
|
"codeceptjs-assert": "^0.0.5",
|
|
41
41
|
"compression": "^1.7.4",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vue3-scroll-border": "0.1.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@live-change/codeceptjs-helper": "0.6.
|
|
56
|
+
"@live-change/codeceptjs-helper": "0.6.14",
|
|
57
57
|
"@wdio/selenium-standalone-service": "^7.20.8",
|
|
58
58
|
"codeceptjs": "^3.3.4",
|
|
59
59
|
"generate-password": "1.7.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"author": "",
|
|
66
66
|
"license": "BSD-3-Clause",
|
|
67
67
|
"description": "",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "f7abc1d907b85c321e629086c162e4b622eee91b"
|
|
69
69
|
}
|