From e256ed478ef25598949113c29a337b33cf25123e Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Mon, 12 Feb 2024 14:25:32 +0100 Subject: [PATCH 01/10] migration to BEXIS v3 #240 --- BExIS.Modules.RBM.UI.csproj | 120 +++++++++------- BExIS.Rbm.Entities/BExIS.Rbm.Entities.csproj | 9 +- BExIS.Rbm.Orm.NH/BExIS.Rbm.Orm.NH.csproj | 2 +- BExIS.Rbm.Services/BExIS.Rbm.Services.csproj | 18 +-- BExIS.Rbm.Services/app.config | 24 ++-- Controllers/NotificationController.cs | 4 +- Controllers/ScheduleController.cs | 21 ++- Helper/SendNotificationHelper.cs | 12 +- Helper/Settings.cs | 134 ------------------ Properties/Settings.Designer.cs | 2 +- Rbm.Settings.json | 78 +++++++++++ web.config | 138 +++++++------------ 12 files changed, 249 insertions(+), 313 deletions(-) delete mode 100644 Helper/Settings.cs create mode 100644 Rbm.Settings.json diff --git a/BExIS.Modules.RBM.UI.csproj b/BExIS.Modules.RBM.UI.csproj index 64e50c5..a3917b7 100644 --- a/BExIS.Modules.RBM.UI.csproj +++ b/BExIS.Modules.RBM.UI.csproj @@ -19,7 +19,7 @@ Properties BExIS.Modules.RBM.UI BExIS.Modules.RBM.UI - v4.5.2 + v4.8 false true @@ -32,6 +32,7 @@ ..\..\..\..\packages\WebGrease.1.5.2\lib 3.1 + true @@ -71,13 +72,17 @@ - + ..\..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + + ..\..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll @@ -105,56 +110,14 @@ ..\..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll - + ..\..\..\..\packages\TelerikMvcExtensions.2013.2.611\lib\net40\Telerik.Web.Mvc.dll - - ..\..\..\..\Libraries\Vaiona\Vaiona.Core.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Entities.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Entities.Orm.NH.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.IoC.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Logging.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Model.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.MultiTenancy.Api.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.MultiTenancy.Services.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Persistence.Api.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.PersistenceProviders.NH.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Utils.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Web.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Web.Mvc.dll - - - ..\..\..\..\Libraries\Vaiona\Vaiona.Web.Mvc.Modularity.dll - ..\..\..\..\packages\WebActivatorEx.2.2.0\lib\net40\WebActivatorEx.dll @@ -186,7 +149,6 @@ - @@ -668,6 +630,9 @@ + + Always + PublicSettingsSingleFileGenerator @@ -705,11 +670,11 @@ - {C230693B-D780-438B-B26C-82257642DD5C} + {c230693b-d780-438b-b26c-82257642dd5c} BExIS.Security.Entities - {681C8BC4-55F0-4F43-A685-90E246A88CB1} + {681c8bc4-55f0-4f43-a685-90e246a88cb1} BExIS.Security.Services @@ -720,6 +685,62 @@ {C4CA0A99-0AF3-4372-A9B7-B9073599BD8B} BExIS.Dlm.Services + + {b446c14f-9df1-4c3c-a634-e3addd05c48a} + Vaiona.Core + + + {c4d4bc9e-8832-4966-be58-cb684e9a74e8} + Vaiona.Entities.Orm.NH + + + {0815d220-3625-4e23-bbbc-8152345637fe} + Vaiona.Entities + + + {29a7be0f-a17c-4ae8-8ca1-15fe4dd74129} + Vaiona.IoC + + + {e8b37581-1cac-463d-903b-b4bee8b2b0e3} + Vaiona.Logging + + + {a60ac05f-8c9a-4efd-9826-452e6049da4d} + Vaiona.Model + + + {bccd3d7b-8a50-4fa2-b9d3-2cb31bea60b3} + Vaiona.MultiTenancy.Api + + + {4639d130-e0aa-4aef-b9bd-bef6ad99dbaf} + Vaiona.MultiTenancy.Services + + + {640bf81d-354a-4bf0-85fc-f0ad587cf8a2} + Vaiona.Persistence.Api + + + {2fb8def8-5749-4eae-8588-8a5aaed251a5} + Vaiona.PersistenceProviders.NH + + + {63fcacaa-9534-4fdd-a082-78dcc06baf28} + Vaiona.Utils + + + {705f8751-e58a-453e-a7fd-0c310fd3cae8} + Vaiona.Web.Mvc.Modularity + + + {5f5d22e8-8c05-49cd-854e-8fe8eff1aa6c} + Vaiona.Web.Mvc + + + {5b48b5a8-eae8-4ef8-8f2c-7fedb1b095d3} + Vaiona.Web + {252f7872-a69c-43a6-84b4-4d2abdbdd9ab} BExIS.Xml.Helpers @@ -791,7 +812,8 @@ mkdir "$(SolutionDir)Console\Workspace\Modules\RBM" -C:\Windows\System32\xcopy "$(ProjectDir)Rbm.Settings.xml" "$(SolutionDir)Console\Workspace\Modules\RBM" /C /Y /I +C:\Windows\System32\xcopy "$(ProjectDir)Rbm.Settings.json" "$(SolutionDir)Console\Workspace\Modules\RBM" /C /Y /I + - - - + + - - + + - - - - - - - - - - - - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - + + - - + + - - + + - - - - - - + + - - - + - - - - + + + + - + + \ No newline at end of file From f38bb6fc6819c648e1d8e33f2fec81a64ca111a8 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Tue, 24 Sep 2024 16:13:13 +0200 Subject: [PATCH 02/10] pub profile for v3 --- BExIS.Modules.RBM.UI.csproj | 1 + .../BexisServer_2030-testsite.pubxml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Properties/PublishProfiles/BexisServer_2030-testsite.pubxml diff --git a/BExIS.Modules.RBM.UI.csproj b/BExIS.Modules.RBM.UI.csproj index a3917b7..4fa386e 100644 --- a/BExIS.Modules.RBM.UI.csproj +++ b/BExIS.Modules.RBM.UI.csproj @@ -633,6 +633,7 @@ Always + PublicSettingsSingleFileGenerator diff --git a/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml new file mode 100644 index 0000000..7b9b929 --- /dev/null +++ b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml @@ -0,0 +1,18 @@ + + + + + FileSystem + FileSystem + Release + Any CPU + + True + False + Y:\RBM + False + + \ No newline at end of file From 08dcbd242db67a710840887766f6eb8ec97881f4 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Wed, 25 Sep 2024 13:47:27 +0200 Subject: [PATCH 03/10] pub profile --- Properties/PublishProfiles/BexisServer_2030-testsite.pubxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml index 7b9b929..db8b727 100644 --- a/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml +++ b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml @@ -12,7 +12,7 @@ indem Sie diese MSBuild-Datei bearbeiten. Weitere Informationen hierzu finden Si True False - Y:\RBM + Y:\Site\Areas\RBM False \ No newline at end of file From e1da5d9f89cab458d8b7efc11dd807832763ac37 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Fri, 27 Sep 2024 14:24:23 +0200 Subject: [PATCH 04/10] pub --- Properties/PublishProfiles/BexisServer_2030-testsite.pubxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml index db8b727..c2c9d94 100644 --- a/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml +++ b/Properties/PublishProfiles/BexisServer_2030-testsite.pubxml @@ -12,7 +12,7 @@ indem Sie diese MSBuild-Datei bearbeiten. Weitere Informationen hierzu finden Si True False - Y:\Site\Areas\RBM + C:\inetpub\wwwroot\2030-TestSite\Site\Areas\RBM False \ No newline at end of file From 14d1f4c099be797d65dc9407a11e538e21bc063c Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Mon, 14 Oct 2024 11:01:10 +0200 Subject: [PATCH 05/10] EntityPermissionManager async in version 3.4.0 --- Controllers/ActivityController.cs | 6 ++-- Controllers/NotificationController.cs | 20 +++++++------- Controllers/ResourceController.cs | 8 +++--- Controllers/ResourceStructureController.cs | 16 +++++------ Controllers/ScheduleController.cs | 32 +++++++++++----------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Controllers/ActivityController.cs b/Controllers/ActivityController.cs index d8d35ea..3b487ee 100644 --- a/Controllers/ActivityController.cs +++ b/Controllers/ActivityController.cs @@ -42,8 +42,8 @@ public ActionResult Activity() // temp.InUse = rManager.IsInEvent(a.Id); // get permission from logged in user - temp.EditAccess = permissionManager.HasEffectiveRight(userId, new List { entityTypeId }, a.Id, RightType.Read); - temp.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List { entityTypeId }, a.Id, RightType.Delete); + temp.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, a.Id, RightType.Read).Result; + temp.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, a.Id, RightType.Delete).Result; model.Add(temp); } @@ -88,7 +88,7 @@ public ActionResult Create(ActivityModel model) // 31 is the sum from all rights: Read = 1, Write = 4, Delete = 8, Grant = 16 int rights = (int)RightType.Read + (int)RightType.Write + (int)RightType.Delete + (int)RightType.Grant; - pManager.Create(user, entityType, a.Id, rights); + //pManager.CreateAsync(user.Name, entityType.Name, a.Id, rights); // End -> add security ------------------------------------------ } diff --git a/Controllers/NotificationController.cs b/Controllers/NotificationController.cs index f915590..3fda902 100644 --- a/Controllers/NotificationController.cs +++ b/Controllers/NotificationController.cs @@ -49,8 +49,8 @@ public ActionResult Notification() NotificationModel temp = new NotificationModel(n); //get permission from logged in user - temp.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, n.Id, RightType.Write); - temp.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, n.Id, RightType.Delete); + temp.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, n.Id, RightType.Write).Result; + temp.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, n.Id, RightType.Delete).Result; model.Add(temp); } @@ -197,8 +197,8 @@ public ActionResult Save(EditNotificationModel model) var group = groupManager.FindByNameAsync(g).Result; if (group != null) { - if (pManager.GetRights(group.Id, entityType.Id, notification.Id) == 0) - pManager.Create(group.Id, entityType.Id, notification.Id, fullRights); + if (pManager.GetRightsAsync(group.Id, entityType.Id, notification.Id).Result == 0) + pManager.CreateAsync(group.Id, entityType.Id, notification.Id, fullRights); } } } @@ -208,8 +208,8 @@ public ActionResult Save(EditNotificationModel model) using (var groupManager = new GroupManager()) { var adminGroup = groupManager.FindByNameAsync("administrator").Result; - if (pManager.GetRights(adminGroup.Id, entityType.Id, notification.Id) == 0) - pManager.Create(adminGroup.Id, entityType.Id, notification.Id, fullRights); + if (pManager.GetRightsAsync(adminGroup.Id, entityType.Id, notification.Id).Result == 0) + pManager.CreateAsync(adminGroup.Id, entityType.Id, notification.Id, fullRights); } @@ -217,7 +217,7 @@ public ActionResult Save(EditNotificationModel model) var userTask = userManager.FindByNameAsync(HttpContext.User.Identity.Name); userTask.Wait(); var user = userTask.Result; - pManager.Create(user, entityType, notification.Id, fullRights); + pManager.CreateAsync(user, entityType, notification.Id, fullRights); //End -> add security ------------------------------------------ @@ -385,7 +385,7 @@ public ActionResult Delete(long id) { Type entityType = entityTypeManager.FindByName("Notification").EntityType; //delete security - permissionManager.Delete(entityType, id); + permissionManager.DeleteAsync (entityType, id); } } @@ -444,8 +444,8 @@ public ActionResult Notification_Select() NotificationModel temp = new NotificationModel(n); //get permission from logged in user - temp.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, n.Id, RightType.Write); - temp.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, n.Id, RightType.Delete); + temp.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, n.Id, RightType.Write).Result; + temp.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, n.Id, RightType.Delete).Result; notifications.Add(temp); } diff --git a/Controllers/ResourceController.cs b/Controllers/ResourceController.cs index 1d75a1a..6f902d4 100644 --- a/Controllers/ResourceController.cs +++ b/Controllers/ResourceController.cs @@ -63,8 +63,8 @@ public ActionResult Resource() //get permission from logged in user - temp.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entity.Id }, r.Id, RightType.Write); - temp.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entity.Id }, r.Id, RightType.Delete); + temp.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entity.Id, r.Id, RightType.Write).Result; + temp.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entity.Id, r.Id, RightType.Delete).Result; model.Add(temp); } @@ -244,7 +244,7 @@ public ActionResult Save() //31 is the sum from all rights: Read = 1, Write = 4, Delete = 8, Grant = 16 int rights = (int)RightType.Read + (int)RightType.Write + (int)RightType.Delete + (int)RightType.Grant; - pManager.Create(user, entityType, resource.Id, rights); + pManager.CreateAsync(user, entityType, resource.Id, rights); } //End -> add security ------------------------------------------ @@ -649,7 +649,7 @@ public ActionResult Delete(long id) { Type entityType = entityTypeManager.FindByName("SingleResource").EntityType; //delete security - permissionManager.Delete(entityType, id); + permissionManager.DeleteAsync(entityType, id); } } diff --git a/Controllers/ResourceStructureController.cs b/Controllers/ResourceStructureController.cs index b3b2a9e..21c251c 100644 --- a/Controllers/ResourceStructureController.cs +++ b/Controllers/ResourceStructureController.cs @@ -48,8 +48,8 @@ public ActionResult ResourceStructure() temp.InUse = rsManager.IsResourceStructureInUse(rs.Id); //get permission from logged in user - temp.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, rs.Id, RightType.Write); - temp.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, rs.Id, RightType.Delete); + temp.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, rs.Id, RightType.Write).Result; + temp.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, rs.Id, RightType.Delete).Result; model.Add(temp); } @@ -90,7 +90,7 @@ public ActionResult Create(CreateResourceStructureModel model) //31 is the sum from all rights: Read = 1, Write = 4, Delete = 8, Grant = 16 int rights = (int)RightType.Read + (int)RightType.Write + (int)RightType.Delete + (int)RightType.Grant; - pManager.Create(user, entityType, rS.Id, rights); + pManager.CreateAsync(user, entityType, rS.Id, rights); //End -> add security ------------------------------------------ @@ -218,7 +218,7 @@ public ActionResult Delete(long id) { Type entityType = entityTypeManager.FindByName("ResourceStructure").EntityType; //delete security - permissionManager.Delete(entityType, id); + permissionManager.DeleteAsync(entityType, id); } } @@ -299,8 +299,8 @@ public ActionResult ResourceStructureAttribute() long entityTypeId = entityTypeManager.FindByName("ResourceStructureAttribute").Id; //get permission from logged in user - rsaModel.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, a.Id, RightType.Write); - rsaModel.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entityTypeId }, a.Id, RightType.Delete); + rsaModel.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, a.Id, RightType.Write).Result; + rsaModel.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entityTypeId, a.Id, RightType.Delete).Result; model.Add(rsaModel); } } @@ -384,7 +384,7 @@ public ActionResult SaveResourceStructureAttribute(EditResourceStructureAttribut Entity entityType = entityTypeManager.FindByName("ResourceStructureAttribute"); - pManager.Create(user, entityType, rsa.Id, 31); + pManager.CreateAsync(user, entityType, rsa.Id, 31); } //End -> add security ------------------------------------------ @@ -494,7 +494,7 @@ public ActionResult DeleteResourceStructureAttribute(long id) { Type entityType = entityTypeManager.FindByName("Notification").EntityType; //delete security - permissionManager.Delete(entityType, id); + permissionManager.DeleteAsync (entityType, id); } } else diff --git a/Controllers/ScheduleController.cs b/Controllers/ScheduleController.cs index c87fa6d..70edb07 100644 --- a/Controllers/ScheduleController.cs +++ b/Controllers/ScheduleController.cs @@ -827,8 +827,8 @@ public ActionResult SaveEvent() var group = groupManager.FindByNameAsync(g).Result; if (group != null) { - if (permissionManager.GetRights(group.Id, entityTypeEvent.Id, eEvent.Id) == 0) - permissionManager.Create(group.Id, entityTypeEvent.Id, eEvent.Id, fullRights); + if (permissionManager.GetRightsAsync(group.Id, entityTypeEvent.Id, eEvent.Id).Result == 0) + permissionManager.CreateAsync(group.Id, entityTypeEvent.Id, eEvent.Id, fullRights); } } } @@ -837,8 +837,8 @@ public ActionResult SaveEvent() //rights on event for logdedin user var userIdLoggedIn = UserHelper.GetUserId(HttpContext.User.Identity.Name); - if (permissionManager.GetRights(userIdLoggedIn, entityTypeEvent.Id, eEvent.Id) == 0) - permissionManager.Create(userIdLoggedIn, entityTypeEvent.Id, eEvent.Id, fullRights); + if (permissionManager.GetRightsAsync(userIdLoggedIn, entityTypeEvent.Id, eEvent.Id).Result == 0) + permissionManager.CreateAsync(userIdLoggedIn, entityTypeEvent.Id, eEvent.Id, fullRights); List notifications = new List(); @@ -922,8 +922,8 @@ public ActionResult SaveEvent() if (group != null) { //rights on schedule - if (permissionManager.GetRights(group.Id, entityTypeSchedule.Id, newSchedule.Id) == 0) - permissionManager.Create(group.Id, entityTypeSchedule.Id, newSchedule.Id, fullRights); + if (permissionManager.GetRightsAsync(group.Id, entityTypeSchedule.Id, newSchedule.Id).Result == 0) + permissionManager.CreateAsync(group.Id, entityTypeSchedule.Id, newSchedule.Id, fullRights); } } } @@ -931,8 +931,8 @@ public ActionResult SaveEvent() //add rights to logged in user if not exsit //rights on schedule 31 is the sum from all rights: Read = 1, Write = 4, Delete = 8, Grant = 16 - if (permissionManager.GetRights(userIdLoggedIn, entityTypeSchedule.Id, newSchedule.Id) == 0) - permissionManager.Create(userIdLoggedIn, entityTypeSchedule.Id, newSchedule.Id, fullRights); + if (permissionManager.GetRightsAsync(userIdLoggedIn, entityTypeSchedule.Id, newSchedule.Id).Result == 0) + permissionManager.CreateAsync(userIdLoggedIn, entityTypeSchedule.Id, newSchedule.Id, fullRights); //Add rights to the schedule and event for all user reserved for foreach (PersonInSchedule user in schedule.ForPersons) @@ -942,12 +942,12 @@ public ActionResult SaveEvent() { //rights on schedule 15 is the sum from this rights: Read = 1, Download = 2, Write = 4, Delete = 8 int schedulesRights = (int)RightType.Read + (int)RightType.Write + (int)RightType.Delete; - if (permissionManager.GetRights(us.Id, entityTypeSchedule.Id, newSchedule.Id) == 0) - permissionManager.Create(us.Id, entityTypeSchedule.Id, newSchedule.Id, schedulesRights); + if (permissionManager.GetRightsAsync(us.Id, entityTypeSchedule.Id, newSchedule.Id).Result == 0) + permissionManager.CreateAsync(us.Id, entityTypeSchedule.Id, newSchedule.Id, schedulesRights); //rights on event, Read = 1, Write = 4 int eventRights = (int)RightType.Read + (int)RightType.Write; - if (permissionManager.GetRights(us.Id, entityTypeEvent.Id, eEvent.Id) == 0) - permissionManager.Create(us.Id, entityTypeEvent.Id, eEvent.Id, eventRights); + if (permissionManager.GetRightsAsync(us.Id, entityTypeEvent.Id, eEvent.Id).Result == 0) + permissionManager.CreateAsync(us.Id, entityTypeEvent.Id, eEvent.Id, eventRights); } } } @@ -2098,14 +2098,14 @@ public ActionResult Show(long id) //Check permission for BookingEvent Entity entity = entityTypeManager.FindByName("BookingEvent"); - model.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entity.Id }, id, RightType.Write); - model.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entity.Id }, id, RightType.Delete); + model.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entity.Id, id, RightType.Write).Result; + model.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entity.Id , id, RightType.Delete).Result; //Check permission for Schedule Entity entity2 = entityTypeManager.FindByName("Schedule"); - model.Schedules.ForEach(a => a.EditAccess = permissionManager.HasEffectiveRight(userId, new List() { entity2.Id }, a.ScheduleId, RightType.Write)); - model.Schedules.ForEach(a => a.DeleteAccess = permissionManager.HasEffectiveRight(userId, new List() { entity2.Id }, a.ScheduleId, RightType.Delete)); + model.Schedules.ForEach(a => a.EditAccess = permissionManager.HasEffectiveRightsAsync(userId, entity2.Id, a.ScheduleId, RightType.Write).Result); + model.Schedules.ForEach(a => a.DeleteAccess = permissionManager.HasEffectiveRightsAsync(userId, entity2.Id , a.ScheduleId, RightType.Delete).Result); //Set Edit access foreach (var s in model.Schedules) From 97cbf03823871432b0609f853724ac23e96d7884 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Mon, 14 Oct 2024 11:01:29 +0200 Subject: [PATCH 06/10] EntityPermissionManager async in version 3.4.0 --- Helper/RbmSeedDataGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helper/RbmSeedDataGenerator.cs b/Helper/RbmSeedDataGenerator.cs index c51c118..a3f663c 100644 --- a/Helper/RbmSeedDataGenerator.cs +++ b/Helper/RbmSeedDataGenerator.cs @@ -323,7 +323,7 @@ public void GenerateSeedData() var resource = rManager.CreateResource(rs_item.name, rs_item.description, rs_item.quantity, rs_item.color, rs_item.withActivity, rs_item.resourceStructure, duration); //add entity rights - permissionManager.Create(adminGroup, + permissionManager.CreateAsync (adminGroup, entityManager.FindByName("SingleResource"), resource.Id, rights From 455a00f4489db87d8ede2048d411d098fd98ac2e Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Mon, 18 Nov 2024 09:26:30 +0100 Subject: [PATCH 07/10] bug if resource of which one has no copied files but the other has is fixed #243 --- Controllers/ScheduleController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Controllers/ScheduleController.cs b/Controllers/ScheduleController.cs index 70edb07..6669141 100644 --- a/Controllers/ScheduleController.cs +++ b/Controllers/ScheduleController.cs @@ -1612,9 +1612,12 @@ public ActionResult UseValuesForAllSchedules(string index) if(s.ResourceHasFiles) { - if(s.Files.FirstOrDefault().Name == tempSchedule.Files.FirstOrDefault().Name) + if (tempSchedule.Files.Count > 0) { - s.FileConfirmation = true; + if (s.Files.FirstOrDefault().Name == tempSchedule.Files.FirstOrDefault().Name) + { + s.FileConfirmation = true; + } } } From 4c85ef0a46664401e41e3296a690d88934a0f8af Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Thu, 5 Dec 2024 13:13:41 +0100 Subject: [PATCH 08/10] email service update --- Helper/SendNotificationHelper.cs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Helper/SendNotificationHelper.cs b/Helper/SendNotificationHelper.cs index 13bb2a8..e2259c0 100644 --- a/Helper/SendNotificationHelper.cs +++ b/Helper/SendNotificationHelper.cs @@ -30,8 +30,10 @@ public static void SendNotification(List receiver, string message, strin List receiverBCC = new List(); receiverBCC.Add(ConfigurationManager.AppSettings["SystemEmail"]); - var emailService = new EmailService(); - emailService.Send(subject, message, receiver, null, receiverBCC, null); + using (var emailService = new EmailService()) + { + emailService.Send(subject, message, receiver, null, receiverBCC, null); + } } /// @@ -94,14 +96,16 @@ public static void SendBookingNotification(BookingAction bookingAction, BookingE receiverBCC.Add(ConfigurationManager.AppSettings["SystemEmail"].ToString()); // Allways send BCC to SystemEmail - var emailService = new EmailService(); - emailService.Send( - subject, - message, - receiver.Distinct().ToList(), - receiverCC, - receiverBCC - ); + using (var emailService = new EmailService()) + { + emailService.Send( + subject, + message, + receiver.Distinct().ToList(), + receiverCC, + receiverBCC + ); + } } } From ca11b2b7ea7d690d665831e8ecc9eb3b07b1a224 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Wed, 21 Jan 2026 10:29:56 +0100 Subject: [PATCH 09/10] add publish profile for v4 prod test https://github.com/bexis/BExIS-intern/issues/804 --- .../BexisServer_v4-ProdTestsite.pubxml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Properties/PublishProfiles/BexisServer_v4-ProdTestsite.pubxml diff --git a/Properties/PublishProfiles/BexisServer_v4-ProdTestsite.pubxml b/Properties/PublishProfiles/BexisServer_v4-ProdTestsite.pubxml new file mode 100644 index 0000000..9eae323 --- /dev/null +++ b/Properties/PublishProfiles/BexisServer_v4-ProdTestsite.pubxml @@ -0,0 +1,18 @@ + + + + + FileSystem + FileSystem + Release + Any CPU + + True + False + C:\inetpub\wwwroot\v4-ProdTestsite\Site\Areas\RBM + False + + \ No newline at end of file From 79c3ca06012780def88ed5a0b57bfc95b3454385 Mon Sep 17 00:00:00 2001 From: Eleonora Petzold Date: Mon, 2 Feb 2026 16:25:31 +0100 Subject: [PATCH 10/10] add PublishProfile --- BExIS.Modules.RBM.UI.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/BExIS.Modules.RBM.UI.csproj b/BExIS.Modules.RBM.UI.csproj index 4fa386e..7428c55 100644 --- a/BExIS.Modules.RBM.UI.csproj +++ b/BExIS.Modules.RBM.UI.csproj @@ -634,6 +634,7 @@ Always + PublicSettingsSingleFileGenerator