ABP Framework version: v8.2.0
UI Type: MVC
Database System: EF Core (SQL Server)
Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
Exception message and full stack trace:
Steps to reproduce the issue:
I have a tiered application. i am treating web as a admin website and public.web as public website. i want to configure it in a way so that the user who have permission to view only public website cannot open admin website. how can i configure this and where should i give permissions.
I dont want any public user to enter admin website.
29 Answer(s)
-
0
hi
Yes.
Do you mean that after clicking Logout on the web website, you are redirected to the public website?
-
0
hi
Yes.
Do you mean that after clicking Logout on the web website, you are redirected to the public website?
My workflow is something like this
- When user tries to login in web project/ admin website.
- If that user have role as public.
- That user should be redirected to public website without login.
- with this code user is redirected to public with logged in. But that user cannot logout (don't know the reason).
-
0
hi
Yes.
Do you mean that after clicking Logout on the web website, you are redirected to the public website?
My workflow is something like this
- When user tries to login in web project/ admin website.
- If that user have role as public.
- That user should be redirected to public website without login.
- with this code user is redirected to public with logged in. But that user cannot logout (don't know the reason). "
app.Use(async (httpContext, next) => { var currentUser = httpContext.RequestServices.GetRequiredService(); if (currentUser.IsInRole("PublicUser")) { //redirect ... return; } await next(); });
"
error user get when click logout after redirect
"error:invalid_request error_description:The client application is not allowed to use the specified identity token hint. error_uri:https://documentation.openiddict.com/errors/ID2141"
-
0
hi
Please use the code from https://abp.io/support/questions/8071/Restrict-Public-Users-from-Accessing-Admin-Website-and-Disable-Their-Login-in-Admin-website?CurrentPage=1#answer-3a15cf9f-1dff-46eb-3f46-458e358d526a