Hello!
I followed the documentation to create a permission system. At the moment it is working in my ApplicationServices (PermissionChecker.IsGranted....) but not in my client. Here is what I got:
AbpPermissions table:
[Id] [Name] [IsGranted] [CreationTime] [CreatorUserId] [RoleId] [UserId] [Discriminator]
1 Admin 1 2015.. NULL 1 NULL RolePermi...
Application > Authorization > ProjectAuthorizationProvider:
public override void SetPermissions(IPermissionDefinitionContext context)
{
context.CreatePermission("Admin", new FixedLocalizableString("Admin"));
}
Application > ProjectApplicationModule:
public override void PreInitialize()
{
Configuration.Authorization.Providers.Add<ProjectAuthorizationProvider>();
}
userController.js:
vm.permissions = {
admin: abp.auth.hasPermission("Admin")
}
console.log(vm.permissions.admin); // returns false (abp.auth does not have any auth information)
I logged in with my adminstrator (roleid = 1).
I Compared to the github examples but cannot find anything different. What am I missing? Thanks!
Helped me very much :) Thanks!
Hello,
I have a 'what would be best'-question, I hope you can help me with it.
I'm using a bootstrap topbar and a dropdown div to display the current logged-in user information. This bar and user information should be available on all pages.
What would be the best way to retrieve this information. I'm thinking about 3 solutions:
I assume that 1. and 2. would be done in the ...ControllerBase so that all the Controllers can use the functionality.
Thanks !
Hello, I'm using the ABP Framework to create a multipage-webapplication but stumbled on a problem trying to implement the authorization.
Using abp.ajax I call the /Account/Login method. All the necessary code is executed, for example: "AuthenticationManager.SignIn(new AuthenticationPr..." and I get returned to the ajax success method but when going to a controller with the [AbpMvcAuthorize] applied I still end on a permission denied page.
PS: I already asked the question on stackoverflow: <a class="postlink" href="http://stackoverflow.com/questions/31901970/asp-net-boilerplate-authorization-not-working">http://stackoverflow.com/questions/3190 ... ot-working</a>
Thanks!