SnailyCAD / snaily-cadv4

💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
https://docs.snailycad.org/docs/getting-started
MIT License
140 stars 84 forks source link

Create permissions for creating new citizen/vehicle/weapon #1822

Closed bartusek27 closed 11 months ago

bartusek27 commented 11 months ago

Describe the feature

Currently, there is no way to restrict users in creating their citizen/vehicle/weapon. If you have integrated game into the CAD, then you have citizens importing automatically into the CAD, so it might not be wanted for players to create users since they might bypass creation of citizen in-game. The same thing goes for creating new vehicles or weapons. I would also separate permissions for creation and for editing. Deleting, if I am correct, is already handled by a feature switch.

Additional Context

No response

casperiv0 commented 11 months ago

Unfortunately, this isn't possible since this would remove those permissions from any user across any installation due to the way permissions are setup.

If this issue were to get more attention in the future, I might let it slip or implement a permissions defaults system to avoid this all together. Feel free to provide a better solution to this if you have any ideas :)!

bartusek27 commented 11 months ago

And making it as a feature switch "Deny players create new records" and "Deny players edit their records" in the same spirit as deletion? Since it is negated, it won't affect current installations due to the flag being false by default. Also we have to keep in mind that LEOs can edit other's records or create a new ones, but only if they are LEOs/EMS/FD due to the feature switch "LEO Editable Citizen Profile" and "Create non-existing citizens/vehicles (LEO)". This would have to be taken into consideration too.