-
Notifications
You must be signed in to change notification settings - Fork 0
Allow user with multiple roles, add UserManager role #86
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
- Coverage 62.39% 61.50% -0.89%
==========================================
Files 28 28
Lines 3438 3484 +46
==========================================
- Hits 2145 2143 -2
- Misses 1293 1341 +48 ☔ View full report in Codecov by Sentry. |
openadr-vtn/src/jwt.rs
Outdated
.collect() | ||
} | ||
|
||
pub fn business_ids(&self) -> (Vec<String>, bool) { |
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.
Would this be better as an enum Foo {Any, Specific(Vec<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.
Good idea! Will change!
} | ||
|
||
impl Claims { | ||
pub fn ven_ids(&self) -> Vec<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.
Could this be a new-type instead of 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.
Probably will be a newtype eventually, given we already have several of those, but I wanted to keep this PR a little smaller.
This implements the first part of #82 I added the ability to add multiple roles specifically to allow creating a kind of superuser account for testing purposes.