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

Activities of "hikalkan"

Hi all,

This application is developed based on ABP vNext (https://abp.io/). So, not related to AspNet Zero product.

We developed this as a standalone module. We will have more modules like that and we planned to sell these modules in a module market (with "source code included" option). But it is very early days for the vNext.

We will make an announcement about the ABP vNext and reply all potantial questions in a very short time :)

Have a nice day.

We've thought about duplicating the role editor front end code, but that's a great deal of duplication.

It's duplication, but seems necessary for your case.

However, what we want to configure are strictly tenant based permissions. For example, we have entire sections of the site that are tenant only, and we want to create a "Demo" role that we can configure in the host that has only read permission (not edit or delete) for all tenant-related pages.

That's more complicated. Tenant will see host pages (as read only). I don't know if this is a critical business requirement for you, however it's funcamentally problematic.

Answer

Hi,

First, you should handle the conflict error. You have 2 options:

A) Check it manually. B) Handle SQL exception (or related exception) in your code. In that case, you should use CurrentUnitOfWork.SaveChanges() in order to apply query to database.

Then you can throw a UserFriendlyException. If you don't like UserFriendlyException, then you have 2 options:

A) Create a custom exception class derived from UserFriendlyException. This is easier. ABP will handle the rest. B) Create a custom exception class not related to UserFriendlyException. In that case, you should replace IExceptionToErrorInfoConverter by your own implementation. Default implementation is like that: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Common/Web/Models/DefaultErrorInfoConverter.cs">https://github.com/aspnetboilerplate/as ... nverter.cs</a>

So, basic implementation can be something like that:

try { ... your code that performs db operations... await CurrentUnitOfWork.SaveChangesAsync(); //or CurrentUnitOfWork.SaveChanges();
} catch(SqlException ex) //SqlException or whatever exception it throws, I don't know exactly { throw new UserFriendlyException("You cant delete this record. Because it has been used"); }

You are sending notification to subscribed users for the current tenant. Did you subscribe to notifications for all users?

Hi,

Notifications are sent by background jobs. If you have a web farm, you probably run background jobs only in one server. Because otherwise, background jobs may be executed per server which causes problems.

Is that true for your case?

Did you handle Redis backplane yourself? Is it integrated to SignalR?

Hi @strix20,

Thank you for your comments. Nothing to worry on your side. We carefully thought on it. Let me explain;

  • License check ONLY works on debug. It does not work on production. It even does not work if you run with Ctrl+F5 in Visual Studio. This is like that since we have developer and product count restrictions, you can deploy to any number of servers.
  • License check runs on a dedicated thread. Thus, it does not slows you down on debug.
  • License check ignores any exception (except invalid license) and it's fault tolerant. If Volosoft server goes down, you can continue to develop and run your application.
  • License check only works for your license period of time. If you have a Regular License for 1 year, license check will not work after your license period end date.

So, there is no risk on your point. I hope that explanation will be sufficient :)

Thank you.

We are working on the issue and will provide a solution when it's completed.

For now, you can try to use Update-Database to run migrations.

Hi,

If you didn't want authotization, I would suggest you to start with free templates (uncheck module-zero from <a class="postlink" href="https://aspnetboilerplate.com/Templates">https://aspnetboilerplate.com/Templates</a>). However, authentication in microservices is a bit complicated stuff. You probably want to use IdentityServer as a standalone authentication server and just add Jwt bearer auth middleware to your microservice that validates auth token from the server. For the main app, you first get a token from the server and call your microservice with this token.

That's a specific scenario and we don't provide a solution for such a model. I don't meen AspNet Zero does not support it. I mean we (as Volosoft) don't provide a pre-built solution for it. So, you should investigate, design and implement such a system. You can start by understanding IdentityServer4 for instance.

Hi,

Is it possible to use multi tenancy enabled for my case and treat each application as a separate tenant?

I never thought an application as a tenant. I don't know if you need multitenancy for your applications, but multitenancy is not for that.

Do you recommend having multiple applications combined into one solution

Depending on your requirements and skills, that can be an option for faster development and easier integration.

Hi,

You want to manage all users, their roles and permissions in a central application. That's not something easy to implement. Every application has their unique permission types and different databases. There can be different scenarios to implement it, but that's not something I can describe it before spending significiant time & effort to analyse and design it. ABP is open source so you can check code and understand where you can hook your logic. A few good places to start:

  1. This is the central point where all permission checks goes: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore/Authorization/PermissionChecker.cs#L46">https://github.com/aspnetboilerplate/as ... ker.cs#L46</a> It currently simply queries it from UserManager (<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore/Authorization/Users/AbpUserManager.cs#L147">https://github.com/aspnetboilerplate/as ... er.cs#L147</a>) which then queries from permission repository (local AbpPermissions table in db) with caching.

  2. AspNet Zero also uses UserManager to set permission of a user.

So, you can (theorically) override needed methods here and do whatever you want (example: Call a remote service of application X to manage permissions of application X).

Showing 21 to 30 of 2190 entries