Do not allow to assign guest as space owner (#10803)

* Exclude guests from space owners

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Show guest if he is in owners

Signed-off-by: Artem Savchenko <armisav@gmail.com>

---------

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2026-04-25 18:29:08 +07:00
committed by GitHub
parent 738a2d0040
commit 338b16d665
9 changed files with 46 additions and 8 deletions
@@ -14,7 +14,7 @@
-->
<script lang="ts">
import { deepEqual } from 'fast-equals'
import { AccountArrayEditor, employeeRefByAccountUuidStore } from '@hcengineering/contact-resources'
import { AccountArrayEditor, employeeRefByAccountUuidStore, getAnonymousRefs } from '@hcengineering/contact-resources'
import core, {
Data,
DocumentUpdate,
@@ -71,6 +71,7 @@
$: isNew = teamspace === undefined
$: membersPersons = members.map((m) => $employeeRefByAccountUuidStore.get(m)).filter(notEmpty)
$: readOnlyGuestOwnerExcludeItems = getAnonymousRefs($employeeRefByAccountUuidStore, owners)
let typeId: Ref<SpaceType> | undefined = teamspace?.type ?? document.spaceType.DefaultTeamspaceType
let spaceType: WithLookup<SpaceType> | undefined
@@ -377,6 +378,7 @@
</div>
<AccountArrayEditor
value={owners}
excludeItems={readOnlyGuestOwnerExcludeItems}
label={core.string.Owners}
onChange={handleOwnersChanged}
kind={'regular'}