Skip to content

fix(boards2): change default permissions to enforce single user roles#5113

Open
jeronimoalbi wants to merge 9 commits intognolang:masterfrom
jeronimoalbi:feat/boards2-single-role-fix
Open

fix(boards2): change default permissions to enforce single user roles#5113
jeronimoalbi wants to merge 9 commits intognolang:masterfrom
jeronimoalbi:feat/boards2-single-role-fix

Conversation

@jeronimoalbi
Copy link
Member

The permissions implementation allows multiple roles per user because custom implementations might need to have more roles within their boards, which might make sense to the realm that implements the permissions.

Boards2 in the other hand defines a fixed set of mutually exclusive roles, owner, admin, moderator and guest, so it must ensure users don't have more than one role.

Without this change it would be possible to assign, for example, the roles owner and admin to the same user, which is fine but semantically doesn't make sense.

By default permissions allows multiple roles per user. This changeset
adds an option to configure permissions to only allow a single role per
user.

Boards2 uses this options because within boards there are a fixed set of
roles which are mutually exclusive.

Custom permissions implementation could define custom roles on top of
the ones pre-defined by Boards2, but these roles are only relevant within
the custom implementation and not within Boards2.
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Feb 3, 2026

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: jeronimoalbi/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@jeronimoalbi jeronimoalbi marked this pull request as ready for review February 3, 2026 11:19
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

🧾 package/realm Tag used for new Realms or Packages.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants