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> <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;