Skip to content

feat: add content and design levels for content and pages custom user roles - #108

Merged
field123 merged 2 commits into
mainfrom
feat/content-designer-levels
Oct 26, 2026
Merged

field123 merged 2 commits into
mainfrom
feat/content-designer-levels

Conversation

@field123

@field123 field123 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Custom user roles can now set the content_and_pages permission group to content (Content creator) or design (Designer), in addition to none, view and manage. The new values are valid for content_and_pages only.

 export type AccessLevel = 'none' | 'view' | 'manage'
+export type ContentAndPagesAccessLevel = AccessLevel | 'content' | 'design'

 export type AccessLevels = {
   ...
-  content_and_pages: AccessLevel
+  content_and_pages: ContentAndPagesAccessLevel
   ...
 }

Evidence

test/unit/custom-user-roles.ts:

create  { content_and_pages: 'content' }       → compiles
update  { content_and_pages: 'design' }        → compiles
// @ts-expect-error  { orders: 'content' }     → rejected
// @ts-expect-error  { products: 'design' }    → rejected
  • Before: the two positive cases fail type-checking.
    After: the test suite passes, and eslint and the rollup build are clean.
  • As a check, temporarily widening every group made both @ts-expect-error lines fail as unused, so the negative cases are real.

Merge Danger

Door: two-way

Additive type change.

Blast Radius: types-only

There is no runtime change. Existing code that uses AccessLevel still compiles.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Test Results

  1 files  ±0   63 suites  ±0   2s ⏱️ ±0s
401 tests ±0  401 ✅ ±0  0 💤 ±0  0 ❌ ±0 
406 runs  ±0  406 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fea1c94. ± Comparison against base commit e0f3e5a.

♻️ This comment has been updated with latest results.

…-levels

# Conflicts:
#	src/types/custom-user-roles.ts
#	test/unit/custom-user-roles.ts
@field123
field123 merged commit 193f6d7 into main Oct 26, 2026
11 checks passed
@field123
field123 deleted the feat/content-designer-levels branch October 26, 2026 17:13
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 36.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants