After successful Login to the Application the AbpAuthorize is still not authorize to the logged in User restricting access to assigned services also the AbpSession.UserId is Null after navigation.
5 Answer(s)
-
0
Hi @sago,
Can you share your related code ?
-
0
<cite>ismcagdas: </cite> Hi @sago,
Can you share your related code ?
This is where the user is Authorized and gets all service list from database..
[AbpAuthorize()] public async Task<List<UserNavigationHierarchyDto>> GetUserNavigationHierarchy(long UserId) { var vmUserNavigationHierarchy = await _sysobjectCustomRepo.GetUserNavigationHierarchy(UserId);
List<UserNavigationHierarchyDto> results = new List<UserNavigationHierarchyDto>(); foreach (var vm in vmUserNavigationHierarchy) { results.Add(new UserNavigationHierarchyDto { Id = vm.Id, Name = vm.JsonName, ParentId = vm.ParentId, Code = vm.Code, SystemObjectTypeId = vm.SystemObjectTypeId, TenantId = vm.TenantId }); } return results; }
After Navigating to a specific service, inside the class inherited from ApplicationService the same [AbpAuthorize()] is Invalid as it cannot enter the class or method requested! I am using ASPNET Core and ANGULAR 5. Node Modules abp-ng2-module v 2.1.0 OS-Win 10
-
0
Show error in Logs.txt.
-
0
<cite>aaron: </cite> Show error in Logs.txt.
The Issue was not related to the Attribute AbpAuthorize, the issue we had is now resolved.
Thanks for you support !
-
0
Ok. Thanks for your feedback!