webhook URL paste, hiding no access role
This commit is contained in:
parent
ab5cbfd309
commit
d41de1ca6a
3 changed files with 8 additions and 4 deletions
|
@ -12,4 +12,4 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<CopyInput {value} copyValue={fullWebhookURL(value)} />
|
||||
<CopyInput value={fullWebhookURL(value)} />
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
export let label = null
|
||||
export let value
|
||||
export let copyValue
|
||||
export let dataCy = null
|
||||
|
||||
const copyToClipboard = val => {
|
||||
|
@ -19,7 +18,7 @@
|
|||
|
||||
<div data-cy={dataCy}>
|
||||
<Input readonly {value} {label} />
|
||||
<div class="icon" on:click={() => copyToClipboard(value || copyValue)}>
|
||||
<div class="icon" on:click={() => copyToClipboard(value)}>
|
||||
<Icon size="S" name="Copy" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
export let app
|
||||
export let user
|
||||
|
||||
let devAccess = user?.admin?.global || user?.builder?.global
|
||||
|
||||
const NO_ACCESS = "NO_ACCESS"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
@ -14,7 +16,10 @@
|
|||
let options = roles
|
||||
.filter(role => role._id !== "PUBLIC")
|
||||
.map(role => ({ value: role._id, label: role.name }))
|
||||
|
||||
if (!devAccess) {
|
||||
options.push({ value: NO_ACCESS, label: "No Access" })
|
||||
}
|
||||
let selectedRole = user?.roles?.[app?._id]
|
||||
|
||||
async function updateUserRoles() {
|
||||
|
|
Loading…
Reference in a new issue