mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Add auto-close registration and admin settings page
First user to register automatically becomes admin and registration closes. Admins can re-open registration from a new settings page. Uses Better Auth admin plugin for role management and a new appSettings table for the registration flag. Mobile tab bar now links to settings instead of inline logout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE `appSettings` (
|
||||
`key` text PRIMARY KEY,
|
||||
`value` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `session` ADD `impersonatedBy` text;--> statement-breakpoint
|
||||
ALTER TABLE `user` ADD `role` text DEFAULT 'user';--> statement-breakpoint
|
||||
ALTER TABLE `user` ADD `banned` integer DEFAULT false;--> statement-breakpoint
|
||||
ALTER TABLE `user` ADD `banReason` text;--> statement-breakpoint
|
||||
ALTER TABLE `user` ADD `banExpires` integer;
|
||||
Reference in New Issue
Block a user