tabarra / txAdmin

The official FiveM server management platform used by over 23k servers!
https://txadmin.gg/
MIT License
803 stars 540 forks source link

feat(resource): Return Permissions with Auth #926

Closed Justus-Braun closed 6 months ago

Justus-Braun commented 6 months ago

Permissions will get returned with "txAdmin:events:adminAuth" event

tabarra commented 6 months ago

Can you describe in details what particular use case you have for this?
Technically we are planning something different for informing other resources about the admin permissions.

Justus-Braun commented 6 months ago

It would allow me to have all permissions and admins be tracked by txAdmin. But a proper Permission System with Groups would be better.

tabarra commented 6 months ago

Uhh I actually need an use case for this information.

Justus-Braun commented 6 months ago

Sorry, I am creating an staff menu for my server which allows staff members to check up with player stats, spawn item, spawn vehicles and more.

When i would get the permissions from the auth event, i would translate txadmin permission to permissions in the staff menu.

This solves the issue when changeing permissions to not do that in 2 places.

But if there is a permission system rework in plan i dont want to interfear with that.

tabarra commented 6 months ago

I decided against merging this PR, because if I do so it will create an expectation of stability of the permission names (strings), and I do plan on changing them when rewriting the admin vault and management system.
Thanks for the PR and suggestion anyways!