Hi alper,
Yep already created the module and I figured out the issue, it was that the UserConfigurationManager needs to actually be called to intialise the app context before any view model or anything using app context is called. It is done in droid in the SplashActivity but for iOS in the main shared project App.xaml.cs. I added a clause for UWP in the App.xaml.cs of the shared project too and it resolves the properties as expected.
There are other issues in the UWP project in relation to look and design but at least it runs so now I can focus on that.
Appreciate the help too thanks
Hi alper,
Yes I did see that post and used it to piece together some of the requirements to get the UWP project started. My problem is related to appContext being null when trying to load the LoginViewModel. I cant see how it relates to AsyncCommand at all?
I believe that appContext is being resolved before its properties are assigned
Regards, Pete
I think I have it resolved but am just getting it retested by client at moment, i had set everything to default to English (Australia) which is required, but it wouldnt select the language no matter what we did. However I read somewhere else (cant remember where) that someone had to create a en-AU.xml file and thats what i have done and it does seem to work now.
I am not 100% sure why that helps but i will keep you posted if it fixed the issue or not
I am having a similar problem in Azure, my local works fine, but on the production server the language switch is not being obeyed. Doesnt matter what I click it will not change language, the request header looks correct and when a cookie does appear (i have deleted them a few times to see if it helps) it also looks correct.
The application is still sending different text back though, i even disabled all but two languages and changed the culture code on the 2nd language (that was always being selected) to something else so it would hopefully pick the default of the tenant, it however still picks the wrong language.
Checking the db table settings gives me various results and im not sure what is actually supposed to be in there, whenever I pick the language of the default tenant I am getting no record in there. Other times there is a null value in there, niether seems correct to my eyes but that doesnt mean its wrong if it was basing on the tenant default then that would be acceptable. I am starting to think maybe the culture header is being stripped from my requests and thus being ignored but I can not find any documentation to support that claim by Azure.
Anyone got any ideas?
Thanks for the suggestion maliming i didnt realise that with zero hangfire is fully setup to go already i just had to toggle the variable in WebConsts and replace the service in Web Module and was up and running.
Works great, I turned the WebConsts flag into an app setting and added a setting for worker count because 20 was too CPU heavy per instance and it now works great.
Thanks for making it easy!
I will have a look thanks
I was going to check that out as well but still wondering if my solution above is viable?
I have been playing around with wanting to do this myself too and just havent had time. I dont believe there is anything done by the zero team yet.
My thoughts are 3 levels of permissions for an entity
So in principle you would setup CRUD permissions per each of the above EntityName.Any.Create EntityName.Any.Edit EntityName.Any.Delete
EntityName.Own.Edit EntityName.Own.Delete
EntityName.Member.Edit EntityName.Member.Delete
Then inherit from RepoBase with something like EntityPermissionCheckedRepositoryBase and overload/overwrite the repo methods you want to confirm permissions on for example if we had a Customer entity that had users who could view it (but not all users) you might have something like this
public override IQueryable<Customer> GetAll() { var query = base.GetAll(); if (!_permissionChecker.IsGranted(AppPermissions.Pages_Customers_Any)) { //if they cant see all then they are limited to ones they are a member of query = (from c in query join cu in Context.CustomerUsers on c.Id equals cu.CustomerId where cu.UserId == Context.AbpSession.UserId select c); } return query; }
So the above will get the normal query from standard repo base.
If the user is not allowed to see all customers then it will add a where clause to the entity to join with a table
that says who cant see what and select the customer entity at the finish. This will basically mean that
anyone with the Any permission can see all, while those without can only see ones they are connected with.
You could then potentially make this generic using interface types and you could even go as far as create a generic entity to replace CustomerUsers (store the entity type name and entity id) and it could map to any entity.
For insert/update/delete type permissions you would need to inherit permission checker and expand it to
pass in entity you are checking against then check like above and throw error or fail silently. You could also
cache the check result to stop unnecessary round trips during those operations
Im not suggesting this is the right way to go and i certainly havent had time to flesh it out properly but its a way i was thinkgin about. You could use an entityframework filter too like they do with tenant id
That worked thanks, better yet after setting that change to the factory I have gone into properties of the EFCore project and set the environment variable in there so it remembers between Visual studio sessions (same as the host project)
Thanks again
Hi again,
Sorry I should have been clearer in my response yesterday.
I have tried both the following and they dont work
set ASPNETCORE_ENVIRONMENT=Development
and
$env:ASPNETCORE_ENVIRONMENT='Development'