ezqms-910: fix workspace roles editing (#5726)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2024-06-04 18:13:38 +04:00 committed by GitHub
parent 33d6ec0786
commit 0afcc2cdfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,12 +24,9 @@
export let visibleNav: boolean = true
const dispatch = createEventDispatcher()
const client = getClient()
const query = createQuery()
const currentRole = getCurrentAccount().role
const currentAccount = getCurrentAccount()
const items: DropdownIntlItem[] = [
{ id: AccountRole.User, label: setting.string.User },
@ -73,7 +70,7 @@
</div>
<DropdownLabelsIntl
label={setting.string.Role}
disabled={!hasAccountRole(account, currentRole) ||
disabled={!hasAccountRole(currentAccount, account.role) ||
(account.role === AccountRole.Owner && owners.length === 1)}
kind={'primary'}
size={'medium'}