Closed dalelane closed 4 years ago
ignore the commit above.... in moving the repo from Github Enterprise to public Github, the issue numbers don't match up, so it refers to a closed issue from the old repo :(
- Creating a new entry in the tenants DB table, with the restrictions to be applied to the new class
That will look something a little like this: https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/db/store.ts#L1633-L1650
- Creating new entries in the bluemixcredentials DB table, to store the newly created service credentials
There is already a REST endpoint that supports this: https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/restapi/watsonapis.ts#L98-L154
However, the auth for the endpoint is set so that only teachers for a class can do this https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/restapi/watsonapis.ts#L175-L180
This will need modifying to allow a site admin to do it.
- Creating a new user in Auth0 for the teacher
Code to do this is here: https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/auth0/users.ts#L128-L141
So looking at the above list, we have a lot of the bits we need.
We need:
Managed classes are currently created manually.
This involves:
Steps 1 and 3 involve running manually written SQL queries against the live production DB.
This isn’t without risk. It’s also a time-consuming process that will only get more challenging to complete if the site popularity increases.
This should be automated, with a simple web interface for performing all of these steps in one easy go. The interface should be available only to site admins.