1
0
Fork 0
mirror of synced 2024-09-09 14:11:30 +12:00

Make fields readonly if scim is enabled

This commit is contained in:
adrinr 2023-03-21 12:28:14 +00:00
parent 1a26899d90
commit 15ed91ef85

View file

@ -84,8 +84,7 @@
const scimEnabled = $licensing.scimEnabled const scimEnabled = $licensing.scimEnabled
$: isSSO = !!user?.provider $: isSSO = !!user?.provider
$: readonly = !$auth.isAdmin $: readonly = !$auth.isAdmin || scimEnabled
$: fullName = user?.firstName ? user?.firstName + " " + user?.lastName : ""
$: privileged = user?.admin?.global || user?.builder?.global $: privileged = user?.admin?.global || user?.builder?.global
$: nameLabel = getNameLabel(user) $: nameLabel = getNameLabel(user)
$: initials = getInitials(nameLabel) $: initials = getInitials(nameLabel)
@ -294,10 +293,11 @@
</div> </div>
<!-- don't let a user remove the privileges that let them be here --> <!-- don't let a user remove the privileges that let them be here -->
{#if userId !== $auth.user._id} {#if userId !== $auth.user._id}
<!-- Disabled if it's not admin, enabled for SCIM integration -->
<div class="field"> <div class="field">
<Label size="L">Role</Label> <Label size="L">Role</Label>
<Select <Select
disabled={readonly} disabled={!$auth.isAdmin}
value={globalRole} value={globalRole}
options={Constants.BudibaseRoleOptions} options={Constants.BudibaseRoleOptions}
on:change={updateUserRole} on:change={updateUserRole}