Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

[$40] - Preparing for role-dependent customization of the challenge details page #1002

Closed
birdofpreyru opened this issue Feb 15, 2017 · 4 comments
Assignees

Comments

@birdofpreyru
Copy link
Collaborator

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.

@birdofpreyru
Copy link
Collaborator Author

@Colinh84 Any update?

@Colinh84
Copy link
Contributor

@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.

@birdofpreyru
Copy link
Collaborator Author

@Colinh84 Ok.

@Colinh84
Copy link
Contributor

pull request is in: topcoder-archive/appirio_tech-tc-site#479

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants