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

Addon Groups with ACE Permissions (b2802) #286

Closed
wants to merge 30 commits into from
Closed

Addon Groups with ACE Permissions (b2802) #286

wants to merge 30 commits into from

Conversation

Local9
Copy link

@Local9 Local9 commented Feb 25, 2023

Covers a request I've kept getting from various communities that have asked in a C# Community Discord I'm in and so I taken the time to work on it and finally PR it here.

Includes all work by @MichaelCoding25 #281 and @XdGoldenTigerOfficial #277 (I wanted to include work from #285 but their fork is 4 commits behind the master so it wouldn't show up on GitHub PR, hopefully I covered most of the items for b2802)

Now back to what I've included, this is due to a request I've been getting for a permissions based grouping system for Addons, I did not change the current addons menu as I didn't want to impact any communities that are still using it and I'm open to improvements in the menus configuration/setup.

The addon-groups.json file in the config folder allows you to define an ACE permission for a group, e.g. VehicleSpawner.Staff. This permission is checked server side and the list of vehicles is returned to the client. Open to PRs on my fork as I'd really like to see vMenu to keep being supported by the FiveM community.

Config only covers ped and vehicle types currently but only takes a minute to add this in for other menus, hopefully this will add to more features and ideas using ACE Permissions in this way.

Example:

{
  "groups": [
    {
      "permission": "VehicleSpawner.Staff",
      "type": "vehicle",
      "label": "Staff Vehicles",
      "options": [
        {
          "model": "journey2",
          "label": "Journey 2"
        },
        {
          "model": "surfer3",
          "label": "Surfer 3"
        }
      ]
    }
  ]
}

File attached contains a working build from my own environment (updated: 2023-02-26 13:33)
vMenu.zip

The reason a lot of files changed is due to Code Cleaning Profiles.

IS4Code and others added 26 commits January 1, 2022 20:24
Co-authored-by: Christopher M. <10535902+cm8263@users.noreply.github.com>
1) Ignore point key on keyboard while text input box is on (currently, if the text input box is enabled and you type B, your ped starts pointing)
2) Changed native hashes to their actual names
Change InfiniteAmmo only if WPUnlimitedAmmo is allowed
Added Chameleon Colour Labels and List
Added a Chameleon Colour List to the Primary Colours Menu.
This list will only show if `server_using_chameleon_colours` is set to `true` in the fxmanifest.lua
Changed Resource metadata config to a convar instead as per request.
@Local9
Copy link
Author

Local9 commented Feb 25, 2023

I personally don't understand the AppVeyor error, any guidance on this is welcome.

@Local9 Local9 changed the title Addon Groups with ACE Permissions Addon Groups with ACE Permissions (b2802) Feb 25, 2023
@MichaelCoding25
Copy link
Contributor

I personally don't understand the AppVeyor error, any guidance on this is welcome.

It means you did not have the README.md file in the folder you were building vMenu from

@Local9
Copy link
Author

Local9 commented Feb 26, 2023

I personally don't understand the AppVeyor error, any guidance on this is welcome.

It means you did not have the README.md file in the folder you were building vMenu from

Thats odd as the build is from a fork of the master which has the README.md in the root so that wouldn't make any sense given the error talks about project references, I also do not have control over the AppVeyor settings so I cannot change its settings.

If I go into the error itself, its having issues with project references and mentions the following issue; dotnet/sdk#6688 and is clear in the AppVeyor response;

Therefore 'Include referenced projects' setting is ignored for .NET Core or .NET Standard projects.

Will see if the reference error is with correct referencing of NewtonSoft in the server project as thats the only .NET Standard project in this solution, but if its MenuAPI then there won't be anything I myself can do. Still, the error has nothing to do with the README.md, if it is, then please provide a solution.

Edit: Can see the error is related to the copy of a file not the project references. Still find it odd thats its copying from the root folder to net452 folder when the project doesn't mention any of that, so this must be an AppVeyor setting.

@Local9
Copy link
Author

Local9 commented Feb 26, 2023

Given I have reverted to the dependency for NewtonSoft to v11 instead of using NewtonSoft v12.0.2, reverting the project files will be best, may also just slap all this work in another commit now given the PR has become a mess.

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.

6 participants