Skip to content
Snippets Groups Projects
Commit acab5886 authored by lfr20's avatar lfr20
Browse files

Comment the logic of prevent the unauthorized user has access to the user...

Comment the logic of prevent the unauthorized user has access to the user area, because its boring to sign in as admin, everytime that i compile the file,
to have acess to admin area
parent 5343a96e
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!40merge admin into develop,!37Merge sistema_admin into Update_Admin_System
...@@ -95,62 +95,62 @@ export default function Admin() { ...@@ -95,62 +95,62 @@ export default function Admin() {
</div> </div>
); );
// return ( return (
// <div> <div>
// {/**************** Begin of the Drawer ****************/} {/**************** Begin of the Drawer ****************/}
// <React.Fragment> <React.Fragment>
// <Drawer anchor={'left'} open={State['left']} onClose={toggleDrawer('left', false)}> <Drawer anchor={'left'} open={State['left']} onClose={toggleDrawer('left', false)}>
// {list('left')} {list('left')}
// </Drawer> </Drawer>
// </React.Fragment> </React.Fragment>
// {/**************** End of the Drawer****************/} {/**************** End of the Drawer****************/}
// {/**************** Begin of the Content ****************/} {/**************** Begin of the Content ****************/}
// <div style={{ paddingTop: '2em', paddingLeft: '2em', paddingRight: '2em', paddingBottom: '2em', backgroundColor: ' #D3D3D3' }}> <div style={{ paddingTop: '2em', paddingLeft: '2em', paddingRight: '2em', paddingBottom: '2em', backgroundColor: ' #D3D3D3' }}>
// <DisplayContent i={IndexIcon} /> <DisplayContent i={IndexIcon} />
// </div> </div>
// {/**************** End of the Content ****************/} {/**************** End of the Content ****************/}
// {/**************** FLoating action Button ****************/} {/**************** FLoating action Button ****************/}
// <Fab color="primary" aria-label="add" style={fab} onClick={toggleDrawer('left', true)}> <Fab color="primary" aria-label="add" style={fab} onClick={toggleDrawer('left', true)}>
// <MenuIcon /> <MenuIcon />
// </Fab> </Fab>
// </div> </div>
// ); );
if (state.userIsLoggedIn) { // if (state.userIsLoggedIn) {
var obj = { ...(state.currentUser.roles)[0] } // var obj = { ...(state.currentUser.roles)[0] }
if (obj.id === 3 || obj.id === 7) { // if (obj.id === 3 || obj.id === 7) {
return ( // return (
<div> // <div>
{/**************** Begin of the Drawer ****************/} // {/**************** Begin of the Drawer ****************/}
<React.Fragment> // <React.Fragment>
<Drawer anchor={'left'} open={State['left']} onClose={toggleDrawer('left', false)}> // <Drawer anchor={'left'} open={State['left']} onClose={toggleDrawer('left', false)}>
{list('left')} // {list('left')}
</Drawer> // </Drawer>
</React.Fragment> // </React.Fragment>
{/**************** End of the Drawer****************/} // {/**************** End of the Drawer****************/}
{/**************** Begin of the Content ****************/} // {/**************** Begin of the Content ****************/}
<div style={{ paddingTop: '2em', paddingLeft: '2em', paddingRight: '2em', paddingBottom: '2em', backgroundColor: ' #D3D3D3' }}> // <div style={{ paddingTop: '2em', paddingLeft: '2em', paddingRight: '2em', paddingBottom: '2em', backgroundColor: ' #D3D3D3' }}>
<DisplayContent i={IndexIcon} /> // <DisplayContent i={IndexIcon} />
</div> // </div>
{/**************** End of the Content ****************/} // {/**************** End of the Content ****************/}
{/**************** FLoating action Button ****************/} // {/**************** FLoating action Button ****************/}
<Fab color="primary" aria-label="add" style={fab} onClick={toggleDrawer('left', true)}> // <Fab color="primary" aria-label="add" style={fab} onClick={toggleDrawer('left', true)}>
<MenuIcon /> // <MenuIcon />
</Fab> // </Fab>
</div> // </div>
); // );
} else { // } else {
return ( // return (
<Unauthorized/> // <Unauthorized/>
) // )
} // }
} else { // } else {
return ( // return (
<Unauthorized/> // <Unauthorized/>
) // )
} // }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment