fixes permissions problem

This commit is contained in:
Keviin Åberg Kultalahti 2021-03-22 12:57:42 +01:00
parent 5b08b31fd6
commit 58aefcec04
1 changed files with 3 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<script>
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 { Button, Label, Input, Select, Spacer } from "@budibase/bbui"
@ -9,14 +9,14 @@
export let onClosed
async function changePermission(level, role) {
await backendUiStore.actions.permissions.save({
await permissionsStore.save({
level,
role,
resource: resourceId,
})
// Show updated permissions in UI: REMOVE
permissions = await backendUiStore.actions.permissions.forResource(
permissions = await permissionsStore.forResource(
resourceId
)
notifier.success("Updated permissions.")
@ -68,10 +68,6 @@
font-weight: 500;
}
hr {
margin: var(--spacing-s) 0 var(--spacing-m) 0;
}
.footer {
display: flex;
justify-content: flex-end;