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

Activities of "ryancyq"

The feature request has been created. See <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1415">https://github.com/aspnetzero/aspnet-ze ... ssues/1415</a>

<cite>joe704la: </cite> I am on the latest version. 5.6.1

MVCAJ or AspNetCoreAJ ?

Answer

Hi @bilalhaidar, you can read the application timezone using the following

// using Abp.Configuration
// using Abp.Timing.Timezone

var applicationsTimezone = _settingManager.GetSettingValueForApplication(TimingSettingNames.TimeZone);
value = _timeZoneConverter.Convert(tempDateTime);

Hi @maharatha,

When I add an user I get to choose the Organization to which I want to add. Is there a way I can also select set of permissions that's applicable for an user specific to that Organization. In a way I want to extend the Permission to Organization as well.

It seems that you are trying to assign specific permissions to a user under a Organization Unit. It looks the same as using Role Permission and assign it to a user. However, if you are looking to make use to OrganizationUnit to grant a set of permissions to a group of users under the same Organization Unit, you can either leverage on RolePermissionSetting or implement something similar like OrganizationUnitPermissionSetting

See <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/9c90ded02bdf291664b5cd7d09e3e30cf0dabbc4/src/Abp.Zero.Common/Authorization/Roles/RolePermissionSetting.cs">https://github.com/aspnetboilerplate/as ... Setting.cs</a>

I was thinking of extending the AbpPermissions entity and add IMayhaveOrganization. But not sure what all places I have to make the changes to make sure the data annotations also work.

I wouldn't suggest this as extending AbpPermission to have IMayhaveOrganization interface means introducing permissions that only existing in certain OrganizationUnit which might not work well with Abp Role & User Management system

Hi @joe704la, can you provide more information? which aspnetzero version you were using?

2FA code is generated every time when SendTwoFactorAuthCode is called.

See <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Controllers/TokenAuthController.cs#L185">https://github.com/aspnetzero/aspnet-ze ... er.cs#L185</a>

It seems that you are looking at something similar to MultiTenancy Data Filter

See <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#data-filters">https://aspnetboilerplate.com/Pages/Doc ... ta-filters</a>

However, for auto insertion of ModeId will require more work. For example, Mode selected by user might need to be stored in the Session as well as determining the Current Mode of user.

See <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#session">https://aspnetboilerplate.com/Pages/Doc ... cy#session</a> And <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant">https://aspnetboilerplate.com/Pages/Doc ... ent-tenant</a>

<cite>smartlayer: </cite> @ryancyq That URL is not working anymore.

Also, for Cookie authentication, we have it so that it keeps sliding if user is active. So it may never expire sometimes and user may have access as long as they wants. You see the drawback here?

@smartlayer, the url provided still valid. You will need to sign in using the GitHub account with the corresponding permission.

In the issue, there is an workaround for SignalR approach.

@smartlayer

Depends on the authentication method being used. For example, cookie authentication, will have it's cookie valid till the expiration.

There was a similar workaround previously discussed at <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/454">https://github.com/aspnetzero/aspnet-ze ... issues/454</a>

Tested with aspnetzero 5.5.2 and I am able to reproduce the issue.

  1. Download new template
  2. dotnet ef update database
  3. Set Const.MultiTenancyEnabled = false
  4. Run Web.Host project

SeedHostDb() will be skipped at <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.EntityFrameworkCore/EntityFrameworkCore/AbpZeroTemplateEntityFrameworkCoreModule.cs#L61">https://github.com/aspnetzero/aspnet-ze ... ule.cs#L61</a>

Because DatabaseCheckHelper.Exist() return false

As mentioned by @ismcagdas, the issue may be related to <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.EntityFrameworkCore/EntityFrameworkCore/DatabaseCheckHelper.cs#L37">https://github.com/aspnetzero/aspnet-ze ... per.cs#L37</a>

Also, I found that when DatabaseCheckHelper.Exist() open database connection, null multiTenancySide is passed into <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.EntityFrameworkCore/EntityFrameworkCore/Uow/UnitOfWorkExtensions.cs#L24">https://github.com/aspnetboilerplate/as ... ons.cs#L24</a>

Subsequently, it is used in <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.EntityFrameworkCore/EntityFrameworkCore/Uow/EfCoreUnitOfWork.cs#L99">https://github.com/aspnetboilerplate/as ... ork.cs#L99</a> and <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.EntityFrameworkCore/EntityFrameworkCore/Uow/EfCoreUnitOfWork.cs#L107">https://github.com/aspnetboilerplate/as ... rk.cs#L107</a>

Ultimately, when getting database connection at <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore.EntityFrameworkCore/Zero/EntityFrameworkCore/DbPerTenantConnectionStringResolver.cs#L40">https://github.com/aspnetboilerplate/as ... ver.cs#L40</a>

Since multiTenancySide is null and it will attempt to retrieve tenant database connection.

Hi @travelsoft

Which lazy loading you are referring to? If it's EF Core, please see <a class="postlink" href="https://github.com/aspnet/EntityFrameworkCore/issues/3797">https://github.com/aspnet/EntityFramewo ... ssues/3797</a>

If it's angular, please see #5351

Showing 551 to 560 of 573 entries