Thank you, that worked (though I am not able to use IPermissionDefinitionContext).
I have set up Permission "Administration" like so: _context.Permissions.Add(new RolePermissionSetting { Name = "Administration", IsGranted = true, RoleId = 2 });
But when adding the Permission to NavigationProvider, like this: context.Manager.MainMenu .AddItem( new MenuItemDefinition( "Administration", new LocalizableString("Administration", "[MyAppName]"), // I use the Const here icon: "fa fa-cogs", requiresAuthentication: true, requiredPermissionName: "Administration" ));
I see an error in Developer Tools: <a class="postlink" href="http://localhost:6334/AbpScripts/GetScripts">http://localhost:6334/AbpScripts/GetScripts</a> Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Logs say this: ERROR 2015-10-13 10:20:08,845 [9 ] .Mvc.Controllers.AbpHandleErrorAttribute - Abp.AbpException: There is no permission with name: Administration
DB looks like this: 3 Administration True 13.10.2015 10:18:07 NULL 3 NULL RolePermissionSetting 4 Administration True 13.10.2015 10:18:07 NULL 4 NULL RolePermissionSetting
Something is still missing here, any advice?
I usually use a newPerson in $scope and bind its properties to my newForm directly so that the object is filled through angular.
To prefill use this: var emptyPerson = { name: "", age: 0 } $scope.newPerson = jQuery.extend({}, emptyPerson); // makes a copy of the object
hope this helps
Hey, I have tested
System.Threading.Thread.CurrentThread.CurrentUICulture
and LanguageManager through injection:
private readonly Abp.Localization.LanguageManager _lanManager;
_lanManager.CurrentLanguage
both work pretty much the same for me.
Have you checked embedded resources in Abp.Core?
Also check: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Localization">http://www.aspnetboilerplate.com/Pages/ ... calization</a>
Hi, I am not sure about this, but have you tried [Abp.WebApi.Authorization.AbpApiAuthorize] ?
It works! Finally got it working.
It was a rather stupid mistake, which i did oversee. I use Postman (chrome plugin) for testing and did provide a Content-Type = application/javascript instead of application/json
The answer is: Use Content-Type = application/json This works, thank you for your answer!
I can't get this to work with PUT
It works with GET and POST though....
not sure, what the problem is
Hi there, since GetAll() returns a Queryable, this indicates it filters on database. Since the SQL Query is not called yet and still in production. It will first be evaluated, when you call .ToList() or iterate manually over it. On the other hand: Thanks for evaluating this again :)
You should probably ask this in a StackOverflow Angular department. Also I am not sure what your problem is... what do you want to do with the $scope.detail object?
best regards, Nils
It did help to specify the controller in the route:
routes.MapHttpRoute(
name: "InhabsApi",
routeTemplate: "api/rooms/{id}/inhabitants/{inhabid}",
defaults: new { controller = "Inhabitants", inhabid = RouteParameter.Optional });
Problem solved. But anyways, what do you think about Attribute Routing?