Base solution for your next web application

Activities of "omital"

How can I inject common repositories to AppServiceBase?

Hi. It's possible to use repositories in seed data? Is that a common approach?

anybody?

Hi. I did this for set 'fa-ir' for default language:
1: just add this line of code in PreInitialize method

Configuration.Localization.Languages.Add(new LanguageInfo("fa-IR", "Farsi", "famfamfam-flag-ir", true));

2: and this in seed data

new ApplicationLanguage(null, "fa-IR", "فارسی", "famfamfam-flag-ir"),

also read this topic "Configuring Default Language For Application" in forum. But noting work?! when user load page for first time default language is "en", and user have to click on link [http://something:6234/AbpLocalization/ChangeCulture?cultureName=fa-IR]) in order to change the language. and this is screenshot from coockies

Where can I find sample (or default) IPermisiionChecker implementation? and what about RoleEdit page? 1-How can I load JUST permission name that related to CurrentSubsystemId (that retrieve from session)? (this section already solved whit this lines of code

var allPermisions = PermissionManager.GetAllPermissions()
                .Where(p=>p.Name.StartsWith(GetCurrentSubsystemPrefix()))
                .Select(p);

) Do you have any better solution? 2- How can I update allowed permission that just related to current subsystem. The problem is here

var grantedPermissions = allPermissions
                 .Where(p=>p.Name.StartsWith(GetCurrentSubsystemPrefix()))
                 .Where(p => input.SelectedPermissions.Contains(p.Name)).ToArray();
await _roleManager.SetGrantedPermissionsAsync(itm, grantedPermissions);

SetGrantedPermissionsAsync update all permission related to current subsystem and clear those subsystem that are not included in allPermission?!

suppose line

Syste.Threading.Thread.Sleep(2000);

added before line

_personRepository.Insert(person);

what happen if client send request rapidly to application service method?

I want to person count can not be bigger than 10

Hi, How can I disable auto view error dialog message after appService's method call? for now after each app service's method execution, abp automatically handle it and view a message to user, even throw UserFriendlyException or AbpException

Can I write my own permission manager for permission check? If "Yes", How implement it? Why I need it: we implement mechanism than user must select Subsystem after login, in a result we have CurrentSubsystem in session. Now, we want implement permission for each Subsystem separately. for example suppose below application service's method:

[AbpAuthorize(new string[] { "ACC.BaseTables.Person.Update" ,"ISO.BaseTables.Person.Update"})]
public void UpdatePerson(){
     //method implementation 
}

We want authorize based on Current selected Substystem (ACC or ISO) that stored in session.

i'm so sorry. this code

_personRepository.Any().Count()

is wrong . it is

_personRepository.Count()

I mean that person's number can not be grater than for example 10.

Showing 21 to 30 of 99 entries