Base solution for your next web application
Open Closed

Original Unit Test Error with Permissions Required #1344


User avatar
1
mengvisal created
Support Team

Hi!

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)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

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

  • User Avatar
    1
    mengvisal created
    Support Team

    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!