Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fupanda"

A fresh template asp mvc jquery version 8.0.0 shows callback code in popup.

Seems that the confirm has an extra param now "title", but is called everywhere like this

abp.message.confirm( app.localize('yourmessage'), function (isConfirmed) { if (isConfirmed) { your code } } );

There is a javascript helper to check the permissions in javascript, however I want to extend this functionality with an extra parameter. I already have my own PermissionChecker and done an override of the IsGranted class in mvc razor views, this work fine, but can't figure out how the abp.auth.hasPermission exactly works and how to extend this.

I implemented my own PermissionChecker, which works fine. I also implemented my own AuthorizationProvider, which works also fine. The only thing is that the PermissionManager.GetAllPermissions() always returns permissions from all AuthorizationProviders. That's because of the following line of code in the initialize of the PermissionManager

foreach (var providerType in _authorizationConfiguration.Providers)

In most cases I want all permissions to be loaded, but not always. How can I get permissions from one AuthorizationProvider without changing code in PermissionManager? Or even better, how could I control this with a parameter?

Is it possible to share data with different tenants?

For example tenant a has projects and want to share the project data with it's client (tenant b).

After upgrading to V4.0.0 we cannot login with existing users anymore. We use ASP.NET 5.x and JQuery version. We don't have modifications at the abp source and only use de NuGet packages. When debugging it seems to go wrong in abp assembly. It looks like it checks on normalized credentials, is there a database migration script missing in the source?

When testing our application we ran into the problem that we couldn't register as a new user or reset the password. Looks like the Register.js and ResetPassword.js are cousing the trouble. These files are coming with the download on <a class="postlink" href="https://aspnetzero.com/Download">https://aspnetzero.com/Download</a>. If I compare sources on github there is a difference

  • <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-template/tree/master/src/AbpCompanyName.AbpProjectName.WebMpa/Views/Account">https://github.com/aspnetboilerplate/mo ... ws/Account</a>
  • <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/tree/dev/src/MyCompanyName.AbpZeroTemplate.Web/Views/Account">https://github.com/aspnetzero/aspnet-ze ... ws/Account</a> When I use the code from the first url it does work, what is the right code to use and why is the standard code downloaded not working?

Update: The PasswordComplexityHelper is causing the problems. Also if the password meets the requirements it will never submits the form. If I delete the _passwordComplexityHelper code from the javascript files everything works fine, except for the check on the password complexity of course. I think the problem is in

jQuery.validator.addMethod("passwordComplexity", function (value, element) {

there is a rule

if (setting.useUpperCaseLetters && !/[a-z]/.test(value)) {
                        return false;
                    }

This always gives false and that's why it never submits. I think it should be

if (setting.useLowerCaseLetters && !/[a-z]/.test(value)) {
                        return false;
                    }

Also if you don't configure the maxlength or min length this also goes wrong, because it compares it with zero. Of course this is always true

if (value.length < setting.minLength) {

and because of that it always give a validation error.

After upgrading to the latest version of ABP we have a problem when updating a record the tenantId becomes 0 and records will not be visible in the application anymore. When getting or creating records there is no problem, only when updating a record.

Here is some example code we use to update a record. Before the upgrade this code worked fine!

[AbpAuthorize(AppPermissions.Pages_Tenant_Projects_Deliveries_Edit)]
        private async Task<ProjectDeliveries> UpdateProjectDelivery(CreateOrUpdateProjectDeliveryInput input)
        {
            await _projectValidationManager.ValidateProjectDefaults(input.ProjectId);
            await _deliveryValidationManager.ValidateUpdateProjectDelivery(input);

            var projectDelivery = input.MapTo<ProjectDeliveries>();
            return await _deliveriesRepository.UpdateAsync(projectDelivery);
        }

After changing some frontend code which has nothing to do with webapi's I get error messages in the browser

  • failed to load recources api/AbpServiceProxies/GetAll
  • Cannot read property 'app' of undefined in _header.js where abp.services.app.userLink; is not recognized

Already tried to rebuild the whole solution but no effect. It's driving me nuts!

When starting de default aspnetzero template in Google Chrome I get an error message Tenant id 2 does not exist. The Tenant id indeed does not exist. But when starting the template with Mcrosoft Edge or Internet Explorer no error will occur, because the Tenant id is 1. Why does the AbpSession give the wrong id? Error occus in the LayoutController

[ChildActionOnly]
        public PartialViewResult Header(string currentPageName = "")
        {
            var headerModel = new HeaderViewModel();
            
            if (AbpSession.UserId.HasValue)
            {
                headerModel.LoginInformations = AsyncHelper.RunSync(() => _sessionAppService.GetCurrentLoginInformations());
            }

            headerModel.Languages = LocalizationManager.GetAllLanguages();
            headerModel.CurrentLanguage = LocalizationManager.CurrentLanguage;
            
            headerModel.Menu = AsyncHelper.RunSync(() => _userNavigationManager.GetMenuAsync(FrontEndNavigationProvider.MenuName, AbpSession.UserId));
            headerModel.CurrentPageName = currentPageName;

            headerModel.IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled;

            return PartialView("~/Views/Layout/_Header.cshtml", headerModel);
        }
Showing 1 to 9 of 9 entries