You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Currently, in my best understanding, when a challenge details page is loaded, no information about user role is fetched from the backend. It prevents us to customize the page according to the user roles (e.g. #969).
The goal in this ticket is to load user roles into the controller of challenge details page, in a manner which makes it easy to check user roles inside the page and display role-dependent content. Keep in mind that for testing purpose we'll like to mock user roles for a challenge sometimes (e.g. by temporarly hard-coding the roles into the source code), thus make this easy to do (i.e. don't hide assignment of role variable deep in the controller's code).
I am not sure, what is the most effective way to fetch user role for a challenge. One option which I have in mind is to use the approach from /my-dashboard page (hosted in this repo), where the list of user challenges fetched from TC API v3 with user-roles info. We may then search for the current challenge id in that list, and thus to get user roles for the specific challenge. You are free to suggest a better approach.
The text was updated successfully, but these errors were encountered:
@birdofpreyru This is going to take a little bit more time if it is ok, the tc-site repo is difficult and time-consuming to deploy correctly so it took a lot of time just to get that up and running.
The challenge details page code is hosted in this repo: https://github.com/appirio-tech/tc-site
Currently, in my best understanding, when a challenge details page is loaded, no information about user role is fetched from the backend. It prevents us to customize the page according to the user roles (e.g. #969).
The goal in this ticket is to load user roles into the controller of challenge details page, in a manner which makes it easy to check user roles inside the page and display role-dependent content. Keep in mind that for testing purpose we'll like to mock user roles for a challenge sometimes (e.g. by temporarly hard-coding the roles into the source code), thus make this easy to do (i.e. don't hide assignment of role variable deep in the controller's code).
I am not sure, what is the most effective way to fetch user role for a challenge. One option which I have in mind is to use the approach from
/my-dashboard
page (hosted in this repo), where the list of user challenges fetched from TC API v3 with user-roles info. We may then search for the current challenge id in that list, and thus to get user roles for the specific challenge. You are free to suggest a better approach.The text was updated successfully, but these errors were encountered: