mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
Fix settins roles check (#4789)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
0c8f00d24a
commit
2f7f3118fd
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { PersonAccount } from '@hcengineering/contact'
|
||||
import { AccountRole, getCurrentAccount } from '@hcengineering/core'
|
||||
import { AccountRole, getCurrentAccount, roleOrder } from '@hcengineering/core'
|
||||
import login, { loginId } from '@hcengineering/login'
|
||||
import { setMetadata } from '@hcengineering/platform'
|
||||
import presentation, { closeClient, createQuery } from '@hcengineering/presentation'
|
||||
@ -57,7 +57,7 @@
|
||||
setting.class.SettingsCategory,
|
||||
{},
|
||||
(res) => {
|
||||
categories = account.role > AccountRole.User ? res : res.filter((p) => !p.secured)
|
||||
categories = roleOrder[account.role] > roleOrder[AccountRole.User] ? res : res.filter((p) => !p.secured)
|
||||
category = findCategory(categoryId)
|
||||
},
|
||||
{ sort: { order: 1 } }
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { PersonAccount } from '@hcengineering/contact'
|
||||
import { AccountRole, getCurrentAccount } from '@hcengineering/core'
|
||||
import { AccountRole, getCurrentAccount, roleOrder } from '@hcengineering/core'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import setting, { SettingsCategory } from '@hcengineering/setting'
|
||||
import {
|
||||
@ -43,7 +43,7 @@
|
||||
setting.class.WorkspaceSettingCategory,
|
||||
{},
|
||||
(res) => {
|
||||
categories = account.role > AccountRole.User ? res : res.filter((p) => !p.secured)
|
||||
categories = roleOrder[account.role] > roleOrder[AccountRole.User] ? res : res.filter((p) => !p.secured)
|
||||
category = findCategory(categoryId)
|
||||
},
|
||||
{ sort: { order: 1 } }
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import contact, { Employee, PersonAccount, formatName } from '@hcengineering/contact'
|
||||
import { AccountRole, Ref, getCurrentAccount } from '@hcengineering/core'
|
||||
import { AccountRole, Ref, getCurrentAccount, roleOrder } from '@hcengineering/core'
|
||||
import login from '@hcengineering/login'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import setting, { SettingsCategory, settingId } from '@hcengineering/setting'
|
||||
@ -41,7 +41,7 @@
|
||||
setting.class.SettingsCategory,
|
||||
{},
|
||||
(res) => {
|
||||
items = account.role > AccountRole.User ? res : res.filter((p) => !p.secured)
|
||||
items = roleOrder[account.role] > roleOrder[AccountRole.User] ? res : res.filter((p) => !p.secured)
|
||||
},
|
||||
{ sort: { order: 1 } }
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user