Create enum to to authorize common keys
By using an enum we have a central place to provide docs for the most common actions/restrictions. Also consumers can pass in type-safe enum values instead of potentially undocumented strings that might contain typos.
Also it is better documents is a value is supposed to be authorized using KAuthorized::authorize or KAuthorized::authorizeAction, in the case of "shell_access" this was mixed up from time to time.
Considering that we do not want the parameter for the methods to become too long
I have deliberately decided against using enum class
. Also we don't have
and usecases for the binary operators in combination with the newly added enums.
Edited by Alexander Lohnau