-
Notifications
You must be signed in to change notification settings - Fork 5
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
Oliinyk / Token PersonalInfo read replacement & Removing Subrole concept & Employee role #2649
Conversation
…nalInfoReadReplacement
- fixed personal cabinet titles for employee and deputy - TODO: fix & fetch provider info by employee id
…ializer, fixed pending applications fetch for provider while profile wasn't received already
src/app/shared/enum/role.ts
Outdated
export enum EntityType { | ||
provider = 'provider', | ||
workshop = 'workshop', | ||
ProviderAdmin = 'provideradmin', | ||
ProviderDeputy = 'provider', | ||
providerDeputy = 'provider', |
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 would like to avoid using the same values for enums.
This was before your changes, but could you please check if it's not difficult to remove this
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.
Possibly, in the past this enum was dedicated to be used in filtering ratings by type. However, in our project it's always workshop
type is used and for provider rating
is always returned within the provider info.
Backend also uses only workshop
for rating https://github.com/ita-social-projects/OoS-Backend/blob/87d225785d61b617b627b958179417313ab63ef6/OutOfSchool/OutOfSchool.WebApi/Controllers/V1/RatingController.cs#L108
Though, I will remove this option
src/app/shared/enum/role.ts
Outdated
@@ -28,3 +25,5 @@ export enum UserTabParams { | |||
parent, | |||
child | |||
} | |||
|
|||
export const ProviderRoles = [Role.provider, Role.providerDeputy, Role.employee]; |
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.
We only use it in util, so we can probably remove it from here
Quality Gate failedFailed conditions |
This PR aims on removing Subrole concept, which was invented in purpose to differ provider users, for example:
It's decided to remove this concept and migrate them to Role (only provider was known as Role).
Also, role, that was read from auth token, here's got from PersonalInfo endpoint because token payload will be encrypted due to its sensitive content.
Per 9/12 there's also fixes for new Employee role.
@humanmantis let's ignore current coverage issues since they're mostly detected as renamed files.