Yuriy
Yuriy
WWasp-lang
Created by Yuriy on 5/4/2024 in #đŸ™‹questions
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('/');
}
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?
20 replies