better naming, filter out public from inheritable roles
This commit is contained in:
parent
da800dd3fc
commit
dbef8077f0
|
@ -11,9 +11,9 @@
|
|||
let errors = []
|
||||
let builtInRoles = ["Admin", "Power", "Basic", "Public"]
|
||||
// Don't allow editing of public role
|
||||
$: allRoles = $roles.filter(role => role._id !== "PUBLIC")
|
||||
$: editableRoles = $roles.filter(role => role._id !== "PUBLIC")
|
||||
$: selectedRoleId = selectedRole._id
|
||||
$: otherRoles = $roles.filter(role => role._id !== selectedRoleId)
|
||||
$: otherRoles = $editableRoles.filter(role => role._id !== selectedRoleId)
|
||||
$: isCreating = selectedRoleId == null || selectedRoleId === ""
|
||||
|
||||
const fetchBasePermissions = async () => {
|
||||
|
@ -98,7 +98,7 @@
|
|||
label="Role"
|
||||
value={selectedRoleId}
|
||||
on:change={changeRole}
|
||||
options={allRoles}
|
||||
options={editableRoles}
|
||||
placeholder="Create new role"
|
||||
getOptionValue={role => role._id}
|
||||
getOptionLabel={role => role.name}
|
||||
|
|
Loading…
Reference in New Issue