LuckPerms

LuckPerms

41.4k Downloads

Feature request: Search permissions by context in-game

zkharit opened this issue ยท 1 comments

commented

I believe this is a feature in the editor (I don't use the editor), but it could be nice to search by context in game.

Example: View all permissions within a server=name
/lp context "server=name" permission info

Example: View all of a group/user's permissions within a server/world
/lp user/group <user/group name> permission info "server/world=name"

I think this would be a very handy feature, especially when preparing for a /lp bulkupdate where you are changing a certain context. The results could be paginated just like a normal result from /lp user permission info. I have been doing this as SQL queries in the MySQL database I am using and its quite simple, just 2 SELECT queries from the two permission tables and a UNION to bring the results together so shouldn't be too hard to implement.
The issue here is that returning perms would maybe have to list all users associated with a permission (for the first example), but maybe this could be avoided by making a click where you could click the permission returned by the command and then it would list all users. The second command shouldn't suffer from this since you are specifying the group/user you are making the query on.

commented

I'm going to close this suggestion on the basis that it's unlikely to make it into the main plugin in the near future. A quality PR implementing this functionality would likely still be accepted, but it's not something I'm going to work on. :)