1
0
Fork 0
mirror of synced 2024-08-02 11:51:34 +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
$: 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}