Browse Source
Merge pull request #1063 from yashank09/master
disables input to edit builtin role name
gh-pages
Martin McKeaveney
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte
|
|
|
@ -9,6 +9,7 @@ |
|
|
|
let permissions = [] |
|
|
|
let selectedRole = {} |
|
|
|
let errors = [] |
|
|
|
let builtInRoles = ['Admin', 'Power', 'Basic', 'Public'] |
|
|
|
$: selectedRoleId = selectedRole._id |
|
|
|
$: otherRoles = $backendUiStore.roles.filter( |
|
|
|
role => role._id !== selectedRoleId |
|
|
|
@ -102,7 +103,7 @@ |
|
|
|
{/each} |
|
|
|
</Select> |
|
|
|
{#if selectedRole} |
|
|
|
<Input label="Name" bind:value={selectedRole.name} thin /> |
|
|
|
<Input label="Name" bind:value={selectedRole.name} thin disabled={builtInRoles.includes(selectedRole.name)}/> |
|
|
|
<Select |
|
|
|
thin |
|
|
|
secondary |
|
|
|
|