-
Notifications
You must be signed in to change notification settings - Fork 1
User Management Guide
There are three types of users as defined by the app:
To become a reviewer of the app, please follow instructions outlined here.
- Any Onshape users can subscribe to the app through the Onshape Appstore. By default, they need to open and authorize access (for the first use) of the app in their Onshape document as a public user.
- Public users have access to all published questions in the app, and they can attempt any questions that they have access to.
- In the Django project, every public user (with a unique
os_user_id) is recorded as anAuthUsermodel object in thequestionerapp.
- Before publishing any question in the app, they should preferably first be reviewed by a few "reviewers" to make sure all drawings are accurate and ready for publication.
- Reviewers have access to all questions in the database, including the ones that are published (accessible to public users) and the ones that are not published (not accessible to public users). If you are an active reviewer, there should be an additional row of buttons in the app's user interface, where the reviewer is able to filter for non-published questions.
- To assign a public user as a reviewer, an administrator of the app needs to first log in to the admin portal (password protected):
{app_base_url}/admin/. A reviewer can be added under theQuestionermodel by providing theos_user_idof the user. - The
os_user_idof an Onshape user can be found using two ways: (1) go to the databasedata.heroku.comto search for allAuthUserand find the one that matches, or (2) use the "Network" panel of the browser's developer tool (aka inspect page) to track the action URL when the app is opened in the right panel. - Note: before assigning an
os_user_idto be a reviewer, the user MUST have first opened and authorized the app in a document. In other words, a reviewer must first be anAuthUser. Otherwise, there won't be any records of the user in the database. If the user name of the user shows up after adding a reviewer, that means the assignment is made successfully. - In the admin portal, a reviewer is by default set to be active. Only active reviewers have access to unpublished questions in the app. To deactivate or re-activate a reviewer, simply use the action available in the
-------dropdown list at the top of the admin page ofReviewers.
- When adding a reviewer in the admin portal, there is a checkbox available to specify a reviewer as a
main_admin. The main admin has exactly same access to questions as a normal reviewer. - When a question is added to the database, the access token of one of the main admins will be used to retrieve question-related information through API calls.
As a reviewer of the app, you will have access to unpublished questions. Before we publish every question in the app, we invite some reviewers to try out the question and make sure the drawing is properly presented and geometrically correct. Once a question is published, we consider it to be final and avoid making any changes to the question, unless absolutely necessary.
Note: The user name associated to your Onshape account (the name at the top right corner of your Onshape home page) will be collected and stored in our database once you become a reviewer. This is necessary for our management purpose only, as we cannot manage a group of IDs without knowing the name of the associated user names.
- Subscribe to the app "CAD Challenges" in the Onshape App Store, if you have not. Once you subscribe to the app, you should have access to the app's icon in the right panel of any Onshape document that you have writing access to.
- Open the app through the right panel at least once and follow the prompted instructions in the app's user interface to grant access for your initial OAuth authorization. Once you complete this step, when you open the app again, you should be redirected to the app's index page directly.
- With you Onshape account logged in, open this link in the same web browser. Click "Try it out" and then "Execute" the API endpoint in Glassworks. Scroll to the bottom of the response body, and you can find the
idof your Onshape account. - Copy the
idfrom the previous step and send it to one of the maintainer of the app, and they can assign you to be a reviewer for this app.
Simply contact one of the maintainer of the app, and we can revert your status back to a normal public user. You will not lose your record on question attempts and your performance on the questions, but your user name collected when you first became a reviewer will be deleted from the app's database.