ForgeTodomator
en

Todomator

Todomator settings and database tables

Todomator · todomator@1.7 todomatorsettingsdatabasepermissions

The settings

Todomator keeps its configuration in the table cl_config and reloads it every 20 minutes. The settings screen (Settings/read, Settings/save in schemas/settings.js) edits these keys, and needs the permission settings:

KeyMeaning
namethe name of the instance
colorthe main colour
tokenthe token of the API
minlogtimethe shortest time entry, in minutes (1 by default) (time tracking)
backupwhen on, each edit of the Markdown of a ticket also stores a copy of the text, with the user, the address and the browser (table tbl_ticket_backup)
folderida default folder

Permissions

A person is an administrator when the flag sa is set or when the permission list contains admin. admin manages folders and the screens of administration; settings allows the settings; bot belongs to the built-in user of the API token. The sessions live in the table tbl_session, and expired ones are deleted once a day.

Two-factor authentication

Each user has the flag is2fa, which the person turns on when changing the password (Users|password). Sign-in then has two steps (plugins/users/index.js): email and password first; if the account has is2fa, Todomator emails a six-digit code (template templates/mail-2fa.html) that is valid for 10 minutes, and the person sends it back to finish. Wrong attempts are blocked after 10 tries in 10 minutes. The mail line of the config file must be set for the code to be delivered.

The database

Everything lives in the public schema of PostgreSQL:

TableWhat it holds
cl_configthe configuration
cl_statusthe six statuses of a ticket
cl_notificationthe types of notification
tbl_userthe users: profile, password hash, permissions and is2fa
tbl_folderthe folders (customers and projects)
tbl_tagthe tags
tbl_ticketthe tickets
tbl_ticket_commentthe comments of the tickets
tbl_ticket_timethe time entries
tbl_ticket_bookmarkthe bookmarks of each user
tbl_ticket_unreadthe unread state per user and ticket
tbl_ticket_datafree data of a ticket (data_read / data_save)
tbl_ticket_backupcopies of the Markdown of a ticket (the backup setting)
tbl_notificationthe notifications of the users
tbl_filethe files that were uploaded
tbl_sessionthe sessions

Back this schema up like any other PostgreSQL database. For an update, apply the database_*.sql scripts of the repository that are newer than your version (install Todomator).