Repository navigation
add "output" permission for output enable/disable - #2633
Merged
MaxKellermann merged 1 commit intoNov 29, 2026
Merged
Conversation
Member
|
The code is fine, but this PR has text that is missing in the commit message. If you write text that you feel is necessary, then it should be part of the git repository and not be lost in GitHub's proprietary database. And add a NEWS line. |
Adds a new `output` permission (`PERMISSION_OUTPUT`) and moves `enableoutput`, `disableoutput`, and `toggleoutput` from `admin` to `output`. Currently, allowing a client to switch or toggle audio outputs requires granting full `admin` privileges. I have a multi-output setup, and wanted to be able to enable output controls separately from `kill`, `mount`, `unmount`, `update`, etc. - `admin` implies `output` (mirroring how `control` implies `player`), so existing `password` / `default_permissions` configurations continue to work unchanged. - `output` is included in the default permissions that are used when no passwords are configured. - Added `PERMISSION_OUTPUT` (`output`) to `src/Permission.hxx` and `src/Permission.cxx`. - Changed `enableoutput`, `disableoutput`, and `toggleoutput` in `src/command/AllCommands.cxx` to require `PERMISSION_OUTPUT` instead of `PERMISSION_ADMIN`. - Updated documentation and example configuration. I have been running and rebasing this patch on my own setups for a couple of years with no issues, and verified it builds and behaves as expected on current `master`.
ryancdotorg
force-pushed
the
permission_output
branch
from
November 29, 2026 14:14
2041e81 to
cad3b20
Compare
Contributor
Author
|
Rebased and commit revised to include the PR text in the commit message itself, and an entry has been added to NEWS. I didn't see anything about those conventions in the developer manual, would a separate PR adding them and a "Contributing: see developer manual" to the README also be welcome? |
Member
|
What do you want to write there? The problem with documentation is that the more you have, the less likely is that people will read it. But of course, improvements to documentation are generally welcome. |
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.
Summary
Adds a new
outputpermission (PERMISSION_OUTPUT) and movesenableoutput,disableoutput, andtoggleoutputfromadmintooutput.Motivation
Currently, allowing a client to switch or toggle audio outputs requires granting full
adminprivileges. I have a multi-output setup, and wanted to be able to enable output controls separately fromkill,mount,unmount,update, etc.Backwards Compatibility
adminimpliesoutput(mirroring howcontrolimpliesplayer), so existingpassword/default_permissionsconfigurations continue to work unchanged.outputis included in the default permissions that are used when no passwords are configured.Changes
PERMISSION_OUTPUT(output) tosrc/Permission.hxxandsrc/Permission.cxx.enableoutput,disableoutput, andtoggleoutputinsrc/command/AllCommands.cxxto requirePERMISSION_OUTPUTinstead ofPERMISSION_ADMIN.Testing
I have been running and rebasing this patch on my own setups for a couple of years with no issues, and verified it builds and behaves as expected on current
master.