feat: add 2FA, secure cookies and publishing tools
This commit is contained in:
5
server/migrations/020_two_factor.sql
Normal file
5
server/migrations/020_two_factor.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Optional TOTP two-factor authentication for administrators.
|
||||
alter table users
|
||||
add column if not exists two_factor_secret text,
|
||||
add column if not exists two_factor_enabled boolean not null default false,
|
||||
add column if not exists two_factor_backup_codes jsonb not null default '[]'::jsonb;
|
||||
7
server/migrations/021_scheduled_publishing.sql
Normal file
7
server/migrations/021_scheduled_publishing.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Optional future publication time for draft courses.
|
||||
alter table courses
|
||||
add column if not exists scheduled_publish_at timestamptz;
|
||||
|
||||
create index if not exists courses_scheduled_publish_index
|
||||
on courses (scheduled_publish_at)
|
||||
where status = 'draft' and scheduled_publish_at is not null;
|
||||
Reference in New Issue
Block a user