Administration
This guide aims to guide you through the administration of the entire ACUBE stack. There is an administration panel at /admin that users in the admin organization can access. This panel provides administrators with the ability to manage various aspects of ACUBE with a user-friendly graphical interface, such as:
- User creation, modification, and deletion
- Submission deletion and management (e.g. erroring modules, remapping submissions)
- Organization creation, modification, and deletion
- Ability to view Feedback
- Ability to set and modify the website banner
Modifications done to a user, such as changing their organizations, will require the user to re-login for the changes to take effect.
Manual Administration
If you have lost access to a user with administrator privileges, the following section will be useful in manually managing ACUBE.
Adding users to ACUBETotal
Knowledge of the PostgreSQL (or even basic SQL) language will be useful.
Table names and column names are wrapped in double quotes ", whereas custom input values are wrapped in single quotes '
- Launch a shell in the
acubetotal-databasecontainerdocker exec -it acubetotal-database /bin/bash
- Connect to the PostgreSQL acubetotal database
psql --username acubetotal
- Add the relevant rows to the
UserstableINSERT INTO "Users" ("id", "name", "email", "expiry", "password", "apiKey") VALUES ('<generated_cuid>', '<name>', '<email, or just use the same name>', '<datetime_string>', <bcrypt_password>, <generated_uuid>);- Generate a
cuidhere - Generate a
uuidhere - Sample of a
datetime_string:2022-10-19T00:27:54.800Z- A simple way to generate it is the enter the
Nodecommand line and usenew Date
- A simple way to generate it is the enter the
- You can Use Cyberchef to generate a Bcrypt password (with 10 rounds)
Extending the expiry date of users in ACUBETotal
- Launch a shell in the
acubetotal-databasecontainerdocker exec -it acubetotal-database /bin/bash
- Connect to the PostgreSQL acubetotal database
psql --username acubetotal
- List current users in the table
SELECT * from "Users";- You can use
\dtto list all tables in the database
- Change the expiry date for the user that you would like to change (note the user in the Name column)
UPDATE "Users" SET "expiry" = '<datetime_string>' WHERE "name" = '<username>';
Miscellaneous tips and tricks
- Save space: Run
docker image pruneto remove docker images that are untagged, anddocker container pruneto remove all stopped docker containers - Hidden files: Use
ls -aorlato list all files, including hidden files (files that start with.)