Great post, after struggling for hours, I found your post - Life saver. Well I got my solution working, but its only working properly when the user is only in one role, if the user is in two roles, the attibute with a role is ignore (even Identity.IsInRole()), Its got something to do with this post github.com/dotnet/aspnetcore/issue... . So heads up to anyone who reads this post and implements it, if its not working in your case, maybe your user has two roles
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great post, after struggling for hours, I found your post - Life saver. Well I got my solution working, but its only working properly when the user is only in one role, if the user is in two roles, the attibute with a role is ignore (even Identity.IsInRole()), Its got something to do with this post github.com/dotnet/aspnetcore/issue... . So heads up to anyone who reads this post and implements it, if its not working in your case, maybe your user has two roles