1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Merge branch 'develop' of github.com:Budibase/budibase into grid-row-click-events

This commit is contained in:
Andrew Kingston 2023-10-02 09:08:20 +01:00
commit 3f267be628
5 changed files with 13 additions and 5 deletions

View file

@ -1,5 +1,5 @@
{
"version": "2.10.16-alpha.17",
"version": "2.10.16-alpha.19",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -3,6 +3,7 @@
import { writable } from "svelte/store"
import { Heading, Icon, clickOutside } from "@budibase/bbui"
import { FieldTypes } from "constants"
import { Constants } from "@budibase/frontend-core"
import active from "svelte-spa-router/active"
const sdk = getContext("sdk")
@ -103,7 +104,8 @@
let validLinks = (allLinks || []).filter(link => link.text && link.url)
// Filter to only links allowed by the current role
return validLinks.filter(link => {
return userRoleHierarchy?.find(roleId => roleId === link.roleId)
const role = link.roleId || Constants.Roles.BASIC
return userRoleHierarchy?.find(roleId => roleId === role)
})
}

View file

@ -25,7 +25,6 @@
value: roleId,
})
}
devToolsStore.actions.changeRole(SELF_ROLE)
return list
}

View file

@ -2,6 +2,7 @@ import { createLocalStorageStore } from "@budibase/frontend-core"
import { initialise } from "./initialise"
import { authStore } from "./auth"
import { API } from "../api"
import { get } from "svelte/store"
const initialState = {
visible: false,
@ -27,9 +28,15 @@ const createDevToolStore = () => {
}
const changeRole = async role => {
if (role === "self") {
role = null
}
if (role === get(store).role) {
return
}
store.update(state => ({
...state,
role: role === "self" ? null : role,
role,
}))
API.invalidateCache()
await authStore.actions.fetchUser()

@ -1 +1 @@
Subproject commit 30385682141e5ba9d98de7d71d5be1672109cd15
Subproject commit 7040ae5282cc23d7ae56ac1be8a369d1c32aab2f