I am trying to implement an AppService called Plug, I want to use User Role and Permissions and I can't seem to get it working, I applied the steps above and I am not winning.
namespace Sprint.Plug
{
[AbpAuthorize(PermissionNames.Pages_PlugEntity)] //Permisions
public class PlugAppService: AsyncCrudAppService<PlugEntity, PlugDto, Guid>, IPlugAppService
{
public PlugAppService(IRepository<PlugEntity,Guid> repository):base(repository)
{
}
}
}
Have you applied the permission to the database for your user/role in AbpPermissions table? if you are already authenticated and you consume that API, [AbpAuthorize(PermissionNames.Pages_PlugEntity)] attribute will check you have permission in table AbpPermissions isgranted or not.