Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ace perms #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

FearlessNite345
Copy link

This is a simple change that adds support for ACE permissions and works as shown below.

In the config where the restrictedChannels are located, it looks very similar if you're using ACE permissions as seen below:

restrictedChannels = {
    [1] = 'LEO',
    [2] = {
        'LEO',
        'EMS',
        'ADMIN'
    }
}

Basically, [1] is still the frequency and the string it's equal to is the ACE permission you must have to join said channel. Now, [2] is the same except it allows for all of the ACE permissions to join that same channel, just in case you need multiple ACE permissions to join the same channel.

@antond15
Copy link
Member

antond15 commented Jul 7, 2024

In case of adding support for ACE permissions, I want it not to be limited as a no-framework fallback.
It should be possible to mix groups and ACE.

@antond15 antond15 added the enhancement New feature or request label Jul 7, 2024
@FearlessNite345
Copy link
Author

i could also add this into the currently supported frameworks basically if the item is not a job.name then it would then check for ACE's if that's what you are meaning this is just a improvement i needed since i use standalone but i fully understand wanting it for all

@FearlessNite345
Copy link
Author

Ok so I have a update to this going to be pushed soon it will allow for both ace perms and framework perms to work side by side if at least one of those is allowed it will allow access to the frequency

@FearlessNite345
Copy link
Author

So the changes i have made are really the same just now instead of only running the aceperm checks if there was not a framework it will run them even if there is a framework this should allow it to work next to frameworks basically as long as either the frameworks or the aceperms returns true it will be allowed access to the channel (im unable to actually test this with frameworks)

@antond15
Copy link
Member

This solution makes unnecessary ace checks for groups and vice versa.

And don't use Citizen for global functions please, it's ugly and useless.

@FearlessNite345
Copy link
Author

I see tbh idk if there's a way to really do them side by side without making either aceperms or groups take priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants