LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[IDEA] PermissionsManager Extension

Open OMEGA3065 opened this issue 5 months ago • 1 comments

Goal Description

Suggestion I suggest a new method simlar to PermissionsManager.GetProvider but it would take the type as a Type object argument instead of a generic type argument. The method doesn't need the type as a generic and it would allow developers to get providers from what PermissionsManager.GetPermissionsByProvider returns.

Notes

Why I recently looked at the PermissionsManager and wondered how I could programatically generate a group (serverRole/badge) by merging multiple groups (serverRoles/badges). I thought I would accomplish this by using PermissionsManager.GetPermissionsByProvider and then making a group from that somehow by adding all the permissions that returns together. Yes, that isn't really possible the way I first intended since I would have to simulate the player is in each serverRole (badge) to get the perms they would have in that case. This wouldn't even always work for any of the non-default providers.

That being said, I do think this could be a usuful addition sometimes and wouldn't be hard to implement. This could just be a PR now that I think of it.

OMEGA3065 avatar Jun 26 '26 13:06 OMEGA3065

Feel free to make Pull Request if you wish 👍

davidsebesta1 avatar Jun 26 '26 22:06 davidsebesta1