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