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

Activities of "Astech"

Hi, I'm unable to run "npm install" or "yarn" in my MVC project.

I tried running this with a fresh copy of node.js.

`C:\Repos\Congresso\src\Congresso.Web.Mvc>npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/bootstrap npm ERR! bootstrap@"4.3.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer bootstrap@"^3.1.1" from [email protected] npm ERR! node_modules/bootstrap-switch npm ERR! bootstrap-switch@"3.3.4" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\JRadu\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\JRadu\AppData\Local\npm-cache_logs\2021-04-21T10_10_38_671Z-debug.log`

We are using Hangfire to run a long running job. When the job is finished we require it to update a column in the database:

public override void Execute(BuildLogJobArgs args)
{
    using (CurrentUnitOfWork.SetTenantId(args.TenantId))
    {
        var itemsCount = 100;
        for (int i = 0; i <= itemsCount; i++)
        {
            //Simulating work
            System.Threading.Thread.Sleep(100);
            SendProgress(i, itemsCount);
        }
        // Send notification to user.
        AsyncHelper.RunSync(() => _appNotifier.LogBuiltAsync(args));

        //Finish the job
        AsyncHelper.RunSync(() => _logsAppService.FinishBuildLog(args.LogId));
    }
}

_logsAppService.FinishBuildLog_logsAppService.FinishBuildLog is responsible for updating the database. However when run we are getting:

Abp.Authorization.AbpAuthorizationException: Current user did not login to the application!

The FinishBuildLog method is protected with [AbpAuthorize....] and we want this to continue to be the case for obvious security reasons.

In which case how can we allow the running job the same permissions to the app service that the user that started the job would have? We do have the User object available to us in the BuildLogJobArgs.

Or is there a better way to go about this?

Thanks,

Scott

Hi,

When I include the ContentPage.BindingContext on my page, the app crashes when trying to load the page.

`

<ContentPage.BindingContext>
    <local:TeamsView />
</ContentPage.BindingContext>

` I'm trying to use OpenContextMenu command which is a command inside my viewmodel.

`

    <Button Text="{StaticResource VerticalEllipsisIcon}"
        FontFamily="{StaticResource IconsFont}"
        Command="{Binding BindingContext.OpenContextMenuCommand}"
        CommandParameter="{Binding}"
        TextColor="DarkGray"
        BackgroundColor="Transparent"
        VerticalOptions="Center"

The viewmodel command: public TeamsViewModel(ITeamsAppService teamsAppService) { _teamsAppService = teamsAppService;

        OpenContextMenuCommand = new Command<TeamModel>(item => item.IsPopupOpen = !item.IsPopupOpen);
        Teams = new ObservableRangeCollection<TeamModel>();
    }

    public Command<TeamModel> OpenContextMenuCommand { get; }

`

  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .NET Core

When I change a setting "App.UiManagement.Theme" for tenant on the mobile application, the old value remains on the web application. This updates fine when the application is started fresh however, is there a way to forcefully load a setting from the db.AbpSettings?

Thanks!

  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .NET Core
  • What is ABP Framework version? 6.0

Hi,

We are using the ASP Net Zero lookup:

I can see in the code it is essentially a disabled text box that shows the selection of the picker:

Is there any way to make the control required? i.e. a selection must be made. At the moment adding required to the input does not work because it is disabled. And we want to keep it disabled because we only want the text set from the picker.

Any ideas? Cheers

Hi,

We are relatively new to Zero and are wanting to add a permission based system to the entities that we create. We have seen the following URL which suggests using Organisation Units:

https://support.aspnetzero.com/QA/Questions/7163/More-detailed-permissions-per-entity

It links to this guide:

https://aspnetboilerplate.com/Pages/Documents/Articles\How-To\add-custom-data-filter-ef-core

The guide details how to have a single OU associated to a user, however in our business model both users and entities can have multiple OUs associated. So for example, an entity may have 3 OUs associated that can access it. A user may be in 5 OUs. As long as one of the OUs matches, they will have access.

Is there a method/guide for acheiving this?

As an additional question is there a premade UI control that we can plug into for the entity OU selection? We have spotted the lookup modal. Should we use this to lookup OUs and allow multi selection of them for each entity or is there a more "built in" way of handling such entity permissions?

We are using the latest Zero version for .NET Core/Jquery.

Thanks in advance

Scott

Showing 21 to 26 of 26 entries