fix: frontend permission check (#784)
This commit is contained in:
parent
440cf63317
commit
2c77a74c40
19 changed files with 186 additions and 74 deletions
|
|
@ -1,3 +1,5 @@
|
|||
'use client'
|
||||
|
||||
import Link from 'next/link'
|
||||
import AccountDropdown from './account-dropdown'
|
||||
import AppNav from './app-nav'
|
||||
|
|
@ -8,6 +10,7 @@ import GithubStar from './github-star'
|
|||
import PluginNav from './plugin-nav'
|
||||
import s from './index.module.css'
|
||||
import { WorkspaceProvider } from '@/context/workspace-context'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
|
||||
const navClassName = `
|
||||
flex items-center relative mr-3 px-3 h-8 rounded-xl
|
||||
|
|
@ -16,6 +19,7 @@ const navClassName = `
|
|||
`
|
||||
|
||||
const Header = () => {
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
return (
|
||||
<>
|
||||
<div className='flex items-center'>
|
||||
|
|
@ -29,7 +33,7 @@ const Header = () => {
|
|||
<ExploreNav className={navClassName} />
|
||||
<AppNav />
|
||||
<PluginNav className={navClassName} />
|
||||
<DatasetNav />
|
||||
{isCurrentWorkspaceManager && <DatasetNav />}
|
||||
</div>
|
||||
<div className='flex items-center flex-shrink-0'>
|
||||
<EnvNav />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue