fixes permissions problem
This commit is contained in:
parent
5b08b31fd6
commit
58aefcec04
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { backendUiStore } from "builderStore"
|
import { backendUiStore } from "builderStore"
|
||||||
import { roles } from 'builderStore/store/backend/'
|
import { roles, permissions as permissionsStore } from 'builderStore/store/backend/'
|
||||||
import { notifier } from "builderStore/store/notifications"
|
import { notifier } from "builderStore/store/notifications"
|
||||||
import { Button, Label, Input, Select, Spacer } from "@budibase/bbui"
|
import { Button, Label, Input, Select, Spacer } from "@budibase/bbui"
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@
|
||||||
export let onClosed
|
export let onClosed
|
||||||
|
|
||||||
async function changePermission(level, role) {
|
async function changePermission(level, role) {
|
||||||
await backendUiStore.actions.permissions.save({
|
await permissionsStore.save({
|
||||||
level,
|
level,
|
||||||
role,
|
role,
|
||||||
resource: resourceId,
|
resource: resourceId,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Show updated permissions in UI: REMOVE
|
// Show updated permissions in UI: REMOVE
|
||||||
permissions = await backendUiStore.actions.permissions.forResource(
|
permissions = await permissionsStore.forResource(
|
||||||
resourceId
|
resourceId
|
||||||
)
|
)
|
||||||
notifier.success("Updated permissions.")
|
notifier.success("Updated permissions.")
|
||||||
|
@ -68,10 +68,6 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: var(--spacing-s) 0 var(--spacing-m) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
Loading…
Reference in New Issue