Browse Source
Merge pull request #9021 from abpframework/RequirePermissionsSimpleBatchStateChecker-patch
Fix the permission check problem.
pull/9029/head
liangshiwei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
6 deletions
-
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RequirePermissionsSimpleBatchStateChecker.cs
|
|
|
@ -24,12 +24,10 @@ namespace Volo.Abp.Authorization.Permissions |
|
|
|
|
|
|
|
foreach (var model in models) |
|
|
|
{ |
|
|
|
if (!_models.Any(x => x.State.GetType() == model.State.GetType() && |
|
|
|
x.RequiresAll == model.RequiresAll && |
|
|
|
x.Permissions.SequenceEqual(model.Permissions))) |
|
|
|
{ |
|
|
|
_models.Add(model); |
|
|
|
} |
|
|
|
_models.RemoveAll(x => x.State.GetType() == model.State.GetType() && |
|
|
|
x.RequiresAll == model.RequiresAll && |
|
|
|
x.Permissions.SequenceEqual(model.Permissions)); |
|
|
|
_models.Add(model); |
|
|
|
} |
|
|
|
|
|
|
|
return this; |
|
|
|
|