Hi,
You can the following code to your MenuContributor
var identity = context.Menu.GetAdministration().GetMenuItem(IdentityMenuNames.GroupName);
identity.GetMenuItem(IdentityMenuNames.Users).RequirePermissions(IdentityPermissions.Users.Delete, IdentityPermissions.Users.Create);
I created an application with the name 'Main' then I added a new Module with the name 'Sub',
How do you add the module Sub?
The suite didn't support it, you need to add the Sub module to Main manually.
We have an example for this: https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular
Hi,
Sorry, but can you explant it in detail? thanks
yes,
Sorry, my bad, I copied the wrong code before, please try this:
public class AccountController : AbpAccountImpersonationChallengeAccountController
{
[HttpGet]
public Task<IActionResult> AccessDenied(string returnUrl = "", string returnUrlHash = "")
{
return Task.FromResult<IActionResult>(Challenge(new AuthenticationProperties { RedirectUri = GetRedirectUrl(returnUrl, returnUrlHash) }, ChallengeAuthenticationSchemas));
}
}
Hi,
Also how this AccessDenied api will be called and from where and what to pass parameters?
I just answer the question, you don't need to do it yourself.
Hi,
It's a class of ASPNETCore: https://github.com/dotnet/aspnetcore/blob/main/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs
Hi,
Sorry, try this:
public class AccountController : AbpAccountImpersonationChallengeAccountController
{
[HttpGet]
public Task<IActionResult> AccessDenied(string returnUrl = "", string returnUrlHash = "")
{
return Task.FromResult<IActionResult>(Challenge(new AuthenticationProperties()));
}
}
Also how this AccessDenied api will be called and from where and what to pass parameters?
This is handled by OpenIdConnectHandler:
Hi,
Please add the to the Web project.
Also what returnURL and returnHash need to be passed here?
After login it can redirect to the previous page, It is recommended that you pass parameters