Base solution for your next web application

Activities of "geertveenstra"

Hi,

I have some users that can create other users (and assign roles to them), but I want to prevent those users to assign the Admin role to others (or themselves). Is this possible ? If not, maybe some hints about how I would go about preventing that ?

Optimally the roles should have some hierarchy where a user with a specific role can only assign roles lower than their own role ?

Geert Veenstra

Hi,

I am using the {TENANCY_NAME} in the url to set the tenant based on this url.

When I am sending an email, it looks like the GetTenantLogoUrl does not work correctly. The The webUrlService.GetServerRootAddress() always returns the url without the tenant name. So http://portal.com instead of https://tenant.portal.com

For now I fixed it by adding private string GetTenancyName(int? tenantId) { return tenantId.HasValue ? TenantCache.Get(tenantId.Value).TenancyName : null; } to the EmailTemplateProvider and GetServerRootAddress(GetTenancyName(tenantId))

Is there a more generic method to get the Tenancyname based on the TenantId, I noticed there is lots of places in the code where a private function is created to get the TenancyName ?

Geert Veenstra

Hi,

There exist two forms with the same name 'OtherSettingsForm' on the Settings\Index.html view page. Because of this the setting QuickThemeSelection is not enabled.

Also, why is this setting only available when MultiTenancy is disabled ?

Hi, Using Asp.net Core MVC jQuery

Currently the setting "IsQuickThemeSelectEnabled" is only used in the AppTopBar component. But disabling this does not prevent downloading all the theme .png pictures that are in the ThemeSelectionPanel. Is is possible to also implement this setting in the layout file so it would not download these pictures/css/scripts on each page load?

Hi,

Using ASP.NET Core MVC & JQuery version 6.8.0 I have just migrated my project to version 6.8.0, but during testing I get javascript errors.

During the minifying process I receive following error:

Processing wwwroot/view-resources/Areas/App/Views/_Bundles/app-layout-libs.js Bundled Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Strict-mode does not allow assignment to undefined variables: r Strict-mode does not allow assignment to undefined variables: g Strict-mode does not allow assignment to undefined variables: b Processing wwwroot/view-resources/Areas/App/Views/_Bundles/host-dashboard-libs.js Bundled Minified

I have also tried with a fresh downloaded copy of 6.8.0, but I am receiving the same errors with that. After some trial and error it seems that the line wwwroot/lib/chart.js/dist/Chart.bundle.min.js is causing the problems. On which pages is this package used (maybe I can leave it out of the bundle)?

Today I had some issues where users are copying their username / password out of an email and the username was pasted but contained spaces. After this the login was (off course) unsuccesfull and the account was blocked after 3 tries.

Should a username and/or password be able to contain spaces at the beginning or end (if not they should maybe be filtered out automatically) ?

requiredPermissionName is marked obsolete, will it be removed in a future version of abp ? Should it be changed to permissionDependency instead ?

Since changing to Core 2.2 I get many warnings during Build.

Should all @Html.Partial be changed to await @Html.PartialAsync ?

Anyone using postgres as a database here ?

I am getting an exception "Can't write CLR type System.Boolean with handler type Int64Handler" in the OrganizationUnitAppService.FindUsers Postgres does not seem to be able to handle a type long from the User entity ID in the following line

.Where(u => !userIdsInOrganizationUnit.Contains(u.Id))

Here is the full exception from the logfile:

System.InvalidCastException: Can't write CLR type System.Boolean with handler type Int64Handler
   at lambda_method(Closure , NpgsqlTypeHandler , Object , NpgsqlLengthCache& , NpgsqlParameter )
   at Npgsql.TypeHandling.NpgsqlSimpleTypeHandler`1.ValidateObjectAndGetLength(Object value, NpgsqlLengthCache& lengthCache, NpgsqlParameter parameter) in C:\projects\npgsql\src\Npgsql\TypeHandling\NpgsqlSimpleTypeHandler.cs:line 236
   at Npgsql.NpgsqlParameter.ValidateAndGetLength() in C:\projects\npgsql\src\Npgsql\NpgsqlParameter.cs:line 553
   at Npgsql.NpgsqlCommand.ValidateParameters() in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 793
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1140
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.BufferlessMoveNext(DbContext _, Boolean buffer, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) in C:\projects\npgsql-entityframeworkcore-postgresql\src\EFCore.PG\Storage\Internal\NpgsqlExecutionStrategy.cs:line 49
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider.GetResult[TResult](IAsyncEnumerable`1 valueBuffers, Boolean throwOnNullResult, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.TaskResultAsyncEnumerable`1.Enumerator.MoveNext(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteSingletonAsyncQuery[TResult](QueryContext queryContext, Func`2 compiledQuery, IDiagnosticsLogger`1 logger, Type contextType)
   at Portal.Organizations.OrganizationUnitAppService.FindUsers(FindOrganizationUnitUsersInput input) in C:\Users\Administrator\Dropbox\Development\DotNet\Workspaces\Websites\Portal\src\Portal.Application\Organizations\OrganizationUnitAppService.cs:line 159
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()
  

As a workaround I change the long type to an int type (which off course is not very nice).

Any suggestions to prevent this ?

Question

Hi,

I was experimenting with the notifications system. I am sending a notification from a background job to a specific user. This works (partly).

After sending the notification, the user sees the popup in the lower right of the screen (but I think this is from the Chrome browser). Only after I do a page refresh i see the red dot above the notification icon in the top bar (the bell).

Is this the normal behaviour or should the icon change directly after the notification was sent ?

Showing 1 to 10 of 17 entries