@7365admin1/core 3.62.1-staging.277 → 3.62.1-staging.279

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ Enforce the organisation's module ceiling on every role write (R1 tier three).
6
+
7
+ A role can no longer be granted a permission whose module Seven365 never gave
8
+ the organisation, nor one the organisation never gave the site. Applied to all
9
+ four write paths — `role.controller` create / update / updatePermissionsById and
10
+ `role-v2.controller` create — because `/api/roles/v2` is a separate mount and
11
+ gating one leaves the rule reachable by adding `/v2` to the URL.
12
+
13
+ Only what a write ADDS is tested, so a role that predates the module list can
14
+ still be renamed and can still have a permission removed. Absent and empty
15
+ module lists still mean everything at every tier, so this is inert for all 168
16
+ live organisations until Seven365 sets a list.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ Tier two of the module cascade: `sites.metadata.modules`, the modules a site offers, plus `PATCH /sites/:id/modules` for the organisation to set it. The write refuses any key Seven365 never gave the organisation (owner requirement R1); the read fails open at every tier, so absent and empty both mean "everything the organisation has" and no site or role editor changes until somebody sets a list.
package/dist/index.d.ts CHANGED
@@ -2126,6 +2126,8 @@ declare enum SiteCategories {
2126
2126
  HOSPITALITY = "hospitality"
2127
2127
  }
2128
2128
  type TSiteMetadata = {
2129
+ /** Tier two of the module cascade — see `site-modules.util.ts`. */
2130
+ modules?: string[];
2129
2131
  block?: number;
2130
2132
  guardPosts?: number;
2131
2133
  gracePeriod?: number;
@@ -2310,6 +2312,7 @@ declare function useSiteController(): {
2310
2312
  updateSiteBlock: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2311
2313
  deleteSite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2312
2314
  updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2315
+ updateSiteModules: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2313
2316
  updateGuardPostsById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2314
2317
  siteInformation: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2315
2318
  getAllSitesForResidentCreation: (req: Request, res: Response, next: NextFunction) => Promise<void>;