mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 00:16:53 +00:00
edit operatorOnly on toggle change
This commit is contained in:
@@ -109,8 +109,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: operatorOnly != undefined && auto_invite_domain && setOperatorOnly()
|
||||
|
||||
async function removeAllInvitesFromDomain() {
|
||||
await Promise.all(
|
||||
invites
|
||||
@@ -127,15 +125,6 @@
|
||||
)
|
||||
)
|
||||
}
|
||||
async function setOperatorOnly() {
|
||||
await removeAllInvitesFromDomain()
|
||||
await WorkspaceService.editAutoInvite({
|
||||
workspace: $workspaceStore ?? '',
|
||||
requestBody: { operator: operatorOnly }
|
||||
})
|
||||
loadSettings()
|
||||
listInvites()
|
||||
}
|
||||
</script>
|
||||
|
||||
<SearchItems
|
||||
@@ -349,6 +338,15 @@
|
||||
options={{
|
||||
right: `Auto-invited users to join as operators`
|
||||
}}
|
||||
on:change={async (e) => {
|
||||
await removeAllInvitesFromDomain()
|
||||
await WorkspaceService.editAutoInvite({
|
||||
workspace: $workspaceStore ?? '',
|
||||
requestBody: { operator: e.detail }
|
||||
})
|
||||
loadSettings()
|
||||
listInvites()
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user