Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Display error in ASP.NET MVC app rather than going to log in screen when user doesn't have proper role/permissions

$
0
0

Is there a way to display an error (pop-up such as as Javascript Alert box) in an ASP.NET MVC 5 app rather than having the app just go to the login screen when a user doesn't have the proper permissions/roles to perform a task/action?

It seems (for my needs at least) that it may confuse some people if it asks them to log in again after they already have logged in . I'd rather have it display a message saying something like "You are not authorized to perform this action." or something like that for those who are logged in, but don't have the proper permissions to do something.  For those who are NOT logged in, it is fine if it goes to the Login page.


Viewing all articles
Browse latest Browse all 4737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>