-
Notifications
You must be signed in to change notification settings - Fork 1
User Management Guide
Felix-Deng edited this page Feb 3, 2023
·
2 revisions
There are three types of users as defined by the app:
- 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.