Open Closed

Original Unit Test Error with Permissions Required #1344

mengvisal created


I try to run the original test project of ASP.NET Zero without modifying anything insides but I have some errors and successes. Those errors are all permissions required. Do you know how to fix this? Below are the error messages:

Result Message: Abp.Authorization.AbpAuthorizationException : Required permissions are not granted. At least one of these permissions must be granted: Pages.Administration.OrganizationUnits Result StackTrace: at Abp.Authorization.PermissionCheckerExtensions.<AuthorizeAsync>d__12.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\PermissionCheckerExtensions.cs:line 272 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

2 Answer(s)
  • 0
    ismcagdas created
    Support Team


    TenantRoleAndUserBuilder class gives all permisisons to admin user. Can you debug and see if PermissionFinder finds any permission in CreateRolesAndUsers method of TenantRoleAndUserBuilder class.

  • 1
    mengvisal created

    Ok i found the problem and solution. I actually changed the feature to have multiple features but forgot to add them to default edition. After i added them in DefaultEditionCreator class, it worked. Thanks!