ABP extends ASP.NET Core Authorization by adding permissions as auto policies and allowing authorization system to be usable in the application services too.
So it supports complex scenarios such as:
public Task MyAction1Async()
{
await CheckMyAction1PolicyAsync();
// ...
}
public Task MyAction2Async()
{
await CheckMyAction2PolicyAsync();
// ...
}
public Task MyAction3Async()
{
await CheckMyAction3PolicyAsync();
// ...
}
private Task CheckMyAction1PolicyAsync()
{
// requires Permission1 and Permission2
await AuthorizationService.CheckAsync("Permission1");
await AuthorizationService.CheckAsync("Permission2");
}
private Task CheckMyAction2PolicyAsync()
{
// requires Permission1 or Permission2
if (!await AuthorizationService.IsGrantedAnyAsync("Permission1", "Permission2"))
{
throw new AbpAuthorizationException("my code");
}
}
private Task CheckMyAction3PolicyAsync()
{
// requires (Permission1 or Permission2) and Permission3
if (!await AuthorizationService.IsGrantedAnyAsync("Permission1", "Permission2") ||
!await AuthorizationService.IsGrantedAsync("Permission3"))
{
throw new AbpAuthorizationException("my code");
}
}
In addition, using Organization Unit will make your job easier in terms of management.
Organization units (OU) is a part of Identity Module and can be used to hierarchically group users and entities.
References:
You can open two modals on top of each other, there is no problem, but this is not recommended due to backdrop problems in bootstrap.
References:
If you're trying to do this for the ExtraProperties
field in the database, you can't. Because the properties set in the ExtraProperties
field are stored as a single JSON object.
However, you can refer to this document which explains the more natural way to do it.
If you have already mapped the property to ef core as stated in the document, you can use the query, below. Because the property you add is kept as a separate column in the database table.
var query = (await GetQueryableAsync()).Where(u => EF.Property<string>(u, "Nickname") == "John");
I did tests for both the 4.4.4
and 5.1.3
versions, apparently, this is a bug.
So, I am creating an internal issue related to the topic, FYI.
Thank you for the report.
Glad it worked. There is nothing wrong with overriding anywhere for your own needs. You don't need to worry about this.
I am closing the issue. Feel free to re-open or create a new issue if you have further questions.
You may be using the version of DNTCapcha
that does not support dotnet v6.0
version.
Can you check?
If you are using the dotnet v6.0
version of DNTCapcha
that supports dotnet v6.0
and you are still getting errors, please provide the relevant log record and code examples so that I can reproduce the error.
This issue does not appear to be related to ABP
. I found the following issue with short research and I wanted to share it in case it might help.
https://github.com/VahidN/DNTCaptcha.Core/issues/96
See also: https://community.abp.io/articles/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n
This issue does not appear to be related to ABP
. I found the following issue with short research and I wanted to share it in case it might help.
https://github.com/VahidN/DNTCaptcha.Core/issues/96
See also: https://community.abp.io/articles/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n
Try abp install-libs
https://github.com/abpframework/abp/blob/dev/docs/en/Migration-Guides/Abp-5-0-MVC.md#use-install-libs-by-default
Maybe the reason it is because the Redis server is not run or improper Redis configuration while using the AbpCachingStackExchangeRedisModule
module.
Can you check if the Redis server is running? https://stackoverflow.com/a/69371513/9922629