Skip to content

Conversation

BackSH00TER
Copy link
Contributor

This pull request includes changes to enhance the permission check system for accessing the MDT by including a minimum grade requirement.

  • server/utils.lua: Updated the PermCheck function to include a check for the minimum grade required for accessing the MDT. The function now verifies if the user's job and grade meet the required criteria.

  • shared/config.lua Updated the Config.PoliceJobs, Config.AmbulanceJobs, and Config.DojJobs to include a minGradeRequired field, allowing for more granular control over access permissions based on job grade.

  • A value of 0 gives access to all grade levels for that job.

Example:

['lawyer'] = true,  =>  ['lawyer'] = { minGradeRequired = 2 },
['judge'] = true,  => ['judge'] = {  minGradeRequired = 0 },

Why is this needed?
Currently the MDT checks the players job to see whether they can access the MDT. This is just checking that their job name matches. Some servers want to be able to limit access to the MDT by job name + grade level. For example, a server might want to configure the 'lawyer' job to only have access to the MDT if they are grade level 2 or higher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant