diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 422969e54..708909daf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -37,11 +37,16 @@ jobs:
testCase:
# Nothing:
- ""
- # Everything:
+ # Everything (except tenancy):
- "--Identity --MicrosoftAuth --GoogleAuth --UserPictures --AuditLogs --ExampleModel --DarkMode --TrackingBase --AppInsights --OpenAPI"
# Assorted partial variants:
- "--Identity --UserPictures --TrackingBase"
- "--Identity --MicrosoftAuth --AuditLogs"
+ # Tenancy variants:
+ - "--Identity --Tenancy --TenantCreateExternal --GoogleAuth"
+ - "--Identity --Tenancy --TenantCreateSelf --TenantMemberInvites --AuditLogs" # todo: add local accounts to this case when we add it
+ - "--Identity --Tenancy --TenantCreateAdmin --TenantMemberInvites --MicrosoftAuth" # todo: add local accounts to this case when we add it
+
defaults:
run:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad9c36aa8..3a7031ac4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,10 @@
# 5.0.2
-- feat: better "not found" messages from data sources when the ID is null or empty string. (#447)
+- feat: Make "not found" messages from data sources clearer when the ID is null or empty string. (#447)
+- feat(template): Added multi-tenancy options to the template. (#441, #461)
- fix(template): adjust manual chunking configuration to avoid circular deps. (#455)
-- fix(audit): key props now respect configured property exclusions
+- fix(audit): key props now respect configured property exclusions.
+- fix: c-admin-method now preserves newlines when displaying success messages.
# 5.0.1
diff --git a/src/coalesce-vue-vuetify3/src/components/admin/c-admin-method.vue b/src/coalesce-vue-vuetify3/src/components/admin/c-admin-method.vue
index bfe622be6..c06f5f35b 100644
--- a/src/coalesce-vue-vuetify3/src/components/admin/c-admin-method.vue
+++ b/src/coalesce-vue-vuetify3/src/components/admin/c-admin-method.vue
@@ -88,9 +88,12 @@
"
class="c-method--result-success"
>
-
+ You have been invited to join the @Model.Tenant.Name organization. You will join as @User.GetUserName(). +
+ + + + + + +} \ No newline at end of file diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Pages/Invitation.cshtml.cs b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Pages/Invitation.cshtml.cs new file mode 100644 index 000000000..7fc5455fa --- /dev/null +++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Pages/Invitation.cshtml.cs @@ -0,0 +1,76 @@ +using Coalesce.Starter.Vue.Data; +using Coalesce.Starter.Vue.Data.Auth; +using Coalesce.Starter.Vue.Data.Models; +using IntelliTect.Coalesce.Models; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.ComponentModel.DataAnnotations; + +#nullable disable + +namespace Coalesce.Starter.Vue.Web.Pages +{ + [Authorize] + public class InvitationModel( + InvitationService invitationService, + SignInManager+ You have created a multi-tenant Coalesce application. The tenancy + model implemented in this template works as follows: +
+
+ Every entity that exists within a tenant implements
+ ITenanted
.
+
+ Entity Framework model configuration is customized to place the
+ TenantId
as the first part of a composite primary key
+ on ITenanted
entities. Foreign keys between tenanted
+ entities are updated to include the TenantId
, which
+ makes it 100% impossible for one tenant's data to become
+ accidentally linked to another tenant's data.
+
+ Entity Framework is configured with a global query filter to + automatically filter queries to the current tenant, and with + interceptors and value generators to automatically populate the + current TenantId on new entities. +
+
+ Users exist independently of tenants, with their membership to
+ zero-or-more tenants recorded in the
+ TenantMembership
table.
+
+ A user can have a special "GlobalAdmin" role, which could be + utilized in your custom code to allow administration of all + tenants. + + + Out of the box, the role allows for the creation of new tenants. + +
+