Reputation: 189
Accessing a page without permission gives the error message:
You do not have permission to view this resource. Please contact the Site Administrator.
However, it should instead redirect to /login
Upvotes: 1
Views: 120
Reputation: 189
Set the permission of the given menu item to Registered, and anyone who is not will be redirected to your login page.
If you want to break the rules and implement this with code, you can add the following code into your template:
if ($('.cAlert:contains("You do not have permission to view this resource.")').length) {
window.location.href = "/login";
};
Upvotes: 1