Lock readonly
This commit is contained in:
parent
1dd5c67392
commit
8e72f1f0fa
|
@ -138,6 +138,11 @@ export const createLicensingStore = () => {
|
|||
const isViewPermissionsEnabled = license.features.includes(
|
||||
Constants.Features.VIEW_PERMISSIONS
|
||||
)
|
||||
|
||||
const isViewReadonlyColumnsEnabled = license.features.includes(
|
||||
Constants.Features.VIEW_READONLY_COLUMNS
|
||||
)
|
||||
|
||||
store.update(state => {
|
||||
return {
|
||||
...state,
|
||||
|
@ -157,6 +162,7 @@ export const createLicensingStore = () => {
|
|||
triggerAutomationRunEnabled,
|
||||
isViewPermissionsEnabled,
|
||||
perAppBuildersEnabled,
|
||||
isViewReadonlyColumnsEnabled,
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script>
|
||||
import { getContext } from "svelte"
|
||||
import { ActionButton, Popover, Icon, notifications } from "@budibase/bbui"
|
||||
import { licensing } from "stores/portal"
|
||||
import { getColumnIcon } from "../lib/utils"
|
||||
import ToggleActionButtonGroup from "./ToggleActionButtonGroup.svelte"
|
||||
|
||||
|
@ -32,6 +33,8 @@
|
|||
return hidden ? `Columns (${hidden} restricted)` : "Columns"
|
||||
}
|
||||
|
||||
$: isViewReadonlyColumnsEnabled = $licensing.isViewReadonlyColumnsEnabled
|
||||
|
||||
const PERMISSION_OPTIONS = {
|
||||
WRITABLE: "writable",
|
||||
READONLY: "readonly",
|
||||
|
@ -43,10 +46,13 @@
|
|||
value: PERMISSION_OPTIONS.WRITABLE,
|
||||
tooltip: "Writable",
|
||||
}
|
||||
const READONLY_OPTION = {
|
||||
$: READONLY_OPTION = {
|
||||
icon: "Visibility",
|
||||
value: PERMISSION_OPTIONS.READONLY,
|
||||
tooltip: "Read only",
|
||||
tooltip: isViewReadonlyColumnsEnabled
|
||||
? "Read only"
|
||||
: "Read only (premium feature)",
|
||||
disabled: !isViewReadonlyColumnsEnabled,
|
||||
}
|
||||
const HIDDEN_OPTION = {
|
||||
icon: "VisibilityOff",
|
||||
|
|
Loading…
Reference in New Issue