mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fix: now menu item will hide for non-admin user (#5222)
This commit is contained in:
parent
774da9c3cd
commit
6453aca185
1 changed files with 3 additions and 1 deletions
|
|
@ -6,9 +6,11 @@ import { Profile } from '@/_components/Profile';
|
|||
import { NotificationCenter } from '@/_components/NotificationCenter';
|
||||
import Logo from '@assets/images/rocket.svg';
|
||||
import Header from '../Header';
|
||||
import { authenticationService } from '@/_services';
|
||||
|
||||
function Layout({ children, switchDarkMode, darkMode }) {
|
||||
const router = useRouter();
|
||||
const { admin } = authenticationService.currentUserValue;
|
||||
|
||||
return (
|
||||
<div className="row m-auto">
|
||||
|
|
@ -47,7 +49,7 @@ function Layout({ children, switchDarkMode, darkMode }) {
|
|||
</ToolTip>
|
||||
</Link>
|
||||
</li>
|
||||
{window.public_config?.ENABLE_TOOLJET_DB == 'true' && (
|
||||
{window.public_config?.ENABLE_TOOLJET_DB == 'true' && admin && (
|
||||
<li className="text-center mt-3 cursor-pointer">
|
||||
<Link to="/database">
|
||||
<ToolTip message="Database" placement="right">
|
||||
|
|
|
|||
Loading…
Reference in a new issue