hasGroup add grade table management#65
Conversation
Signed-off-by: 137ElPro <103851494+137ElPro@users.noreply.github.com>
Refactor group rank checking to handle multiple requirements. Signed-off-by: 137ElPro <103851494+137ElPro@users.noreply.github.com>
Signed-off-by: 137ElPro <103851494+137ElPro@users.noreply.github.com>
|
What's the purpose for this ? |
|
The purpose of this change is to improve group-grade validation. This PR adds support for a grade table, allowing access to be defined for specific grades instead of relying on the minimum-grade logic. In short: it adds more precise permission handling by allowing explicit grade-based rules. |
|
I've been testing it and it doesn't seem to have any problems |
Maximus7474
left a comment
There was a problem hiding this comment.
Logic is sound and resolves the targeted issue.
Only change I'd do is have and extra if statement to check groupRank prior to checking the req variable type. I'd also consider renaming it for better readability, to maybe something like requiredRank.
At this stage, it also makes the group parameter of the function more complex having now multiple data types so adding some luadoc to define explicitly it's contents would also be a decent addition in my opinion.
This is personal feedback on the changed code, not a required change requested by COX to approve it's merge.
|
Any updates to this? #65 (review) |
Signed-off-by: 137ElPro <103851494+137ElPro@users.noreply.github.com>
|
I suppose it would already be |
No description provided.