iftechfoundation / ifarchive-admintool

Admin script for IF Archive work
1 stars 1 forks source link

The file admin interface for the IF Archive

This is the web interface that allows administrators and volunteers to move files around the IF Archive and edit the Index files that describe them.

The web service maintains a list of users (including administrators). This uses a traditional web login process with authentication cookies. However, accounts are not self-service; each account must be created by an admin with command-line access.

(We assume that admins have login accounts on the Archive server. Other volunteers do not; their only access is through the web service.)

The service is built on Python, server-side WSGI, and a whole lot of extremely Web-1.0 HTML forms. At present there is no Javascript at all.

Principles

We separate the work into roles as much as possible. A user can have any number of roles. The current roles are:

It should not be possible to destroy or overwrite files from the web service. Mistakes should always be recoverable, although it might take an admin to untangle serious problems.

Thus, "deleting" a file moves it to the /trash directory, where it will live for at least 30 days. Similarly, whenever you edit an Index file, the previous version is copied to /trash.

All activity is logged, and users can review the log (at least the recent part).

Contents

The tool also makes use of the SQLite database in /var/ifarchive/lib/sql. This must be writable by both Apache and the admins.

Command-line use

python3 /var/ifarchive/wsgi-bin/admin.wsgi

This will display a list of command-line commands.

Testing

It is possible to test the admin interface on a local Apache server. See TESTING.md.