Add PERM_ACL_REGION_MGR role for delegated region management#2438
Open
hank wants to merge 1 commit intomeshcore-dev:devfrom
Open
Add PERM_ACL_REGION_MGR role for delegated region management#2438hank wants to merge 1 commit intomeshcore-dev:devfrom
hank wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
Introduces a fourth ACL role (value 4) that can manage the region map
without full admin privileges. The role is intended for trusted users
who curate regions on a repeater but should not have access to general
admin commands.
ClientACL:
- Widen PERM_ACL_ROLE_MASK from 2 to 3 bits so the new value fits.
- Add PERM_ACL_REGION_MGR and ClientInfo::isRegionMgr().
- Exempt region_mgr entries from least-recently-active eviction in
putClient(), same as admins.
simple_repeater:
- Phones may still gate UI on the legacy is_admin byte (reply_data[6]),
so report region_mgr as admin there. Without this, the phone CLI
falls back to guest view.
- Allow region_mgr to send TXT_MSG CLI commands. handleCommand()
gates non-whitelisted commands with "Err - not permitted". The
whitelist covers region.* (read+write) plus a small set of
read-only queries (get, ver, board, neighbors, clock, sensor
get/list).
- Pass the ClientInfo* through to handleCommand and drop the
redundant sender_timestamp parameter (derived from
sender->last_timestamp; NULL means Serial CLI).
- Use ~PERM_ACL_ROLE_MASK instead of ~0x03 when clearing role bits
on login, so the wider mask is honored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a fourth ACL role (value 4) that can manage the region map without full admin privileges. The role is intended for trusted users who curate regions on a repeater but should not have access to general admin commands.
ClientACL:
simple_repeater:
#2437 was tested along with this change. Everything functioned as expected using a modified client with the new permission level for region managers added. Everything should also be backwards compatible with clients that do not support this - using level 3 admin still works the same way it did before.