Skip to content

fix: a plugin permission deny loses to an allow at the same level - #8423

Merged
si458 merged 1 commit into
Ylianst:masterfrom
Rambomst:fix/plugin-permission-deny
Nov 30, 2026
Merged

si458 merged 1 commit into
Ylianst:masterfrom
Rambomst:fix/plugin-permission-deny

Conversation

@Rambomst

@Rambomst Rambomst commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In this pull request, the following changes are made:

  • pluginHandler.js: each plugin permission level (global, device group, device) checked its allowed lists before its denied lists, so a user who was both allowed and denied at one level was allowed: allowed through a user group and denied by name, allowed by name and in a denied user group, in an allowed and a denied user group, or on both lists by name. Both Permissions dialogs let a user be put on both lists. The denied lists are checked first now. Between levels nothing changes: a device override still beats a device group override, which still beats the global setting.

Tested on NeDB with seven users in two user groups, a device group and a device, through checkPluginPermission() and getAccessPermissions(): on master the 9 checks with a user both allowed and denied at one level came back allowed; on this branch they are denied, and the other 7 (one list only, overrides between levels, defaults) are unchanged.

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • 🧠 I used LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 Any UI changes adhere to visual style of this project.
  • 🛠️ I have self-reviewed and self-tested my code to ensure it works as expected.
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🧰 Dependency updates are listed and explained.
  • ⚠️ CI passes and is green.

Detailed List of Changes:
- Check the denied lists of a permission level before the allowed lists, a user who was both denied and allowed there, by name or through a user group, was allowed
@si458
si458 merged commit efc59d8 into Ylianst:master Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants