mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 13:36:52 +00:00
chore: hide owned by me for super
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { OrgUserRoles } from 'nocodb-sdk'
|
||||
|
||||
type FilterType = 'all' | 'starred' | 'private' | 'owned' | 'managed'
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -22,9 +24,13 @@ const { t } = useI18n()
|
||||
|
||||
const { isMobileMode } = useGlobal()
|
||||
|
||||
const { orgRoles } = useRoles()
|
||||
|
||||
const isFilterDropdownOpen = ref(false)
|
||||
const isSearchFocused = ref(false)
|
||||
|
||||
const isSuperAdmin = computed(() => !!orgRoles.value?.[OrgUserRoles.SUPER_ADMIN])
|
||||
|
||||
// Filter options in priority order: Starred → Private → Managed → Owned
|
||||
const filterOptions = computed<NcListItemType[]>(() => [
|
||||
{ value: 'all', label: t('activity.allBases'), icon: 'ncList' },
|
||||
@@ -35,7 +41,7 @@ const filterOptions = computed<NcListItemType[]>(() => [
|
||||
{ value: 'managed', label: t('labels.managed'), icon: 'ncBox' },
|
||||
]
|
||||
: []),
|
||||
{ value: 'owned', label: t('activity.ownedByMe'), icon: 'ncUser' },
|
||||
...(!isSuperAdmin.value ? [{ value: 'owned', label: t('activity.ownedByMe'), icon: 'ncUser' }] : []),
|
||||
])
|
||||
|
||||
const selectedFilter = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user