-
Hi @JonPSmith! First thank you very much for this project, the documentation and all the work and effort you put into it! I'm currently in the planning and research state for a few projects and AuthP ticks many feature boxes. I worked through the blog articles and most of the wiki documentation and also played a bit with Example 4, without diving too deep into the library code, though. I found a few things for which I would like to pick your opinion, if this is the wrong medium let me know and I'll create issues:
Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @khoffrath, I will endeavour to answer your questions. I would like to utilize your SoftDeleteService in the AuthP context.When use say "...the AuthP context" I think you are thinking about the data your want to hold in each tenant and not the AuthP users, roles etc. See my answer to your migration tables about different parts of the application data is managed separately. If that is what you mean you certainly use my SoftDeleteService, as it is specifically designed to work on tenant data. That's because a client wanted a multi-tenant app with soft delete (I talk about that project in this ASP.NET community standup on multi-tenant apps). The SoftDeleteService can handle query filters with multiple parts (see the Multiple Query filters document). This means you can soft delete a entity while still keeping the tenant filter (in AuthP that is known as the NOTE: You can't soft delete the AuthP users, roles etc. The Auditing the AuthP contextAgain, the "...the AuthP context" is ambiguous. You create your own DbContext for the data you want to manage, so you can do whatever you want. If you really want to audit the AuthP users, roles etc. there is a way to do that. There is a way to detect changes, which - see this AuthP document and this article. I noticed that the migration history tables are created in the "main" schemaI have used different names for the migrations, but in the default schema. Your idea is good, but I can't change things now as that makes it much more difficult for a project to move up the the next version. I work hard to make new versions from having breaking changes. Npgsql offers a configuration option UseSnakeCaseNamingConventionOf course you can do that on your DbContext for your data, but I'm not going to change the AuthP for one user. I will look at whether I can give you access the options when setting up the contexts as I have done that in my EfCore.TestSupport library. Final noteBe aware that I am still working on this library. At the moment I'm improving ways to handle the linking of ASP.NET Core authentication handles to AuthP. After that I'm looking at adding services fro setting sharding databases using Azure SQL Database elastic pools. |
Beta Was this translation helpful? Give feedback.
-
Hi @JonPSmith, thanks for your detailled reply. Sorry when I was unclear when I said "AuthP context", actually I meant the context that contains the AuthP users, roles, etc. As you said, adding the SoftDelete service and auditing to the db context for tenant data is not a problem because we have full control over the db context. SoftDelete serviceIf it's not possible to add soft delete to the context holding the AuthP users, roles, etc. we'll can work around it by setting the Auditing AuthP users, roles...Auditing the AuthP users and roles, especially actions of tenant admins is an important feature. I missed the documentation how to detect changes you linked to and will check it out, thank you. Location of migration history tablesPreventing breaking changes is always nice and makes upgrading easier 💯 . After I posted the question it occurred to me that even if we use the database sharding feature, this wouldn't be a problem because the sharding feature is based on databases and not schemas. Since every shard is a separate database, the locaction of the history tables is mostly cosmetic. UseSnakeCaseNamingConventionUnderstood and as I wrote it's mostly cosmetic. Please don't put any effort to expose this option. If we'll eventually have to query the tables directly we can quote the identifiers. Thank you again for your time and input 😃 |
Beta Was this translation helpful? Give feedback.
Hi @khoffrath,
I will endeavour to answer your questions.
I would like to utilize your SoftDeleteService in the AuthP context.
When use say "...the AuthP context" I think you are thinking about the data your want to hold in each tenant and not the AuthP users, roles etc. See my answer to your migration tables about different parts of the application data is managed separately.
If that is what you mean you certainly use my SoftDeleteService, as it is specifically designed to work on tenant data. That's because a client wanted a multi-tenant app with soft delete (I talk about that project in this ASP.NET community standup on multi-tenant apps).
The SoftDeleteService can handle query filters…