WaspW
Wasp2y ago
Yuriy

Is these a server side validation of isAdmin?

On OpenSaaS the following snippet cehcks isAdmin access rights to validate access to the admin page.
const Dashboard = ({ user }: { user: User }) => {
  const history = useHistory();
  if (!user.isAdmin) {
    history.push('/');
  }

This looks very light one, frontend validaition. Is there any backend validation?
Was this page helpful?