Main features of the current database - More information - Track users action
- Check whether a user has access to a certain project
DB workflow with projects When a user access/projects, the app sends a request to the Project API via Intermediate API and the Intermediate API checks the projects between DB and Project API. And only returns the projects to users that are matching(after the cross-check between DB and Project API) For instance, with the Public access level: - DB has projects A, B, C and E
- Projects API has projects A, B, C, D and E
- Then user only gets A, B, C and E as available projects. Hence, make sure to add project D to the DB
For instance, with the Private access level: - DB(project table) has projects A, B, and C and all have access level Private
- DB(users_project) has projects A and B
- Project API has projects A, B, and C
- Then user only gets A and B as available projects because this user only has access to A and B but C
(When the time comes for Private projects or adding more public/private projects, it might be a good idea to implement an interface to add projects to the DB) The way of adding projects to the DB - Make sure you are on 1p where the MariaDB container is running
- Run the following command,
docker ps to find a container's ID where the image label says mariadb - Run the following command to find the container's IPAddress,
docker inspect {replace me with container id} | grep "IPAd". This will provide an IPAddress for the mariadb container - Access the container with the following command,
mysql -h {replace me with the ip address} -P 3306 -u {replace me with userid for DB} -p{replace me with password for DB}
For the -u argument, it's for a username and needs a space between -u and username, whereas -p is for password and does not need a space between -p and password - Then you are now in the MariaDB. Use some SQL skills to add projects and/or users_projects(if it is for the private access level project)
|