Adding permission-level as a context
CJDennisT opened this issue ยท 6 comments
Description
Hello!
It would be awesome if we could use permission levels or operator status as a context for permissions.
Proposed Behaviour
The plugin could grab the current permission level or operator status of a player, or listen for a permission level change on the server, and can be used for context.
Extra Details
No response
Hi there,
Could you elaborate more as to your specific use case for these context values?
Generally, we recommend that no one on the server is OP - at all. This is because OP has the potential to override some LuckPerms calculations and cause general hysteria.
When using a permission plugin like LP, there should be no need for anyone to be OP.
One use case that does come to mind is Forge. Since adoption of the permissions system is still pretty low (and therefore most mods still use basic op checks for permission), it might make sense to have op be the authoritative permissions source.
That being said, if you're on a non-Forge platform i.e. Bukkit, then I'd highly encourage you to instead have LP be the authoritative permissions source, and use the auto-op system to allow LP to manage OP status using permissions.
while luckperms setting op level may be useful for environments that havent fully moved over to permissions, having op level be a luckperms context, which is what the original post appears to be requesting, doesnt really make sense to me.
edit: just realized using OP for original post and op for operator in a single sentence may not have been the smartest idea lol
Going to preface with that this may not be the best way to achieve "custom commands with permissions" but this is the example I have on hand.
I use a plugin called CommandWhitelist which restricts what a player can see when typing in commands. Below is what I currently have 'allowed'.
The issue with this is when I give myself operator, this does not change and I cannot see the full list of commands.
In order to get access to the full list of commands, I need to set commandwhitelist.bypass
to true on myself. Below is what I see after I make that change.
The way I was accessing the ability to change this command was opening the web GUI or typing the full command, which I wanted to avoid.
Through all this I have realised that I could just give myself permission to change gamemode and set context for commandwhitelist.bypass
, instead of giving myself operator and setting context through that.
I believe this is resolved or not needed as a suggestion. I hope this gives some insight into my thinking pattern.
i dont really see how op level has anything to do with this example you provided