Limit adming page to the admin group

This commit is contained in:
2025-06-28 10:12:03 -07:00
parent 01146661c7
commit 14cdcbd675
@@ -22,6 +22,11 @@ export class NewItemComponent {
constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) { constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) {
this.title.setTitle("New | ADMIN"); this.title.setTitle("New | ADMIN");
if (auth.isLoggedIn){
if (auth.loggedInUser.siteData.role != "Admin"){
router.navigate(["/"]);
}
}
}; };
sleep(ms: number) { sleep(ms: number) {