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
1 changed files with 3 additions and 3 deletions

View File

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