-
Notifications
You must be signed in to change notification settings - Fork 1
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
Removes privileges enum. #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the prefixing is good.
Ohh is it just the cast from the |
@elffjs I would prefer to change the middleware as long as the blast radius isn't too bad. I don't believe the JWT decoding will be affected. |
Yeah go for it. It will be a minor pain when someone upgrades the shared library. |
privileges/privileges.go
Outdated
ManufacureMintDevice Privilege = 1 | ||
// ManufactureDistributeDevice provides access to distributing a device. | ||
ManufactureDistributeDevice Privilege = 2 | ||
// ManufactureFactoryReset provides access to factory resetting a device. | ||
ManufactureFactoryReset Privilege = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manufacturer
? (misspelled in the first line)
privileges/privileges.go
Outdated
switch p { | ||
case NonLocationData: | ||
// String returns the string representation of a VehiclePrivilege. | ||
func (v Privilege) String() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add cases for the manufacturer ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I am going to get rid of it since we can't distinguish ManufacturerMintDevice and VehicleNonLocationData in any meaningful way.
Switched types to int64 to match the values used in claims. Updated names to have vehicle prefixe since we have multiple sets of privileges