Add admin form to view and edit users

This commit is contained in:
Alex Cabal 2024-11-23 13:13:31 -06:00
parent 32607fb220
commit 8ad3291a35
35 changed files with 902 additions and 72 deletions

View file

@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS `Benefits` (
`CanUploadArtwork` tinyint(1) unsigned NOT NULL DEFAULT 0,
`CanReviewArtwork` tinyint(1) unsigned NOT NULL DEFAULT 0,
`CanReviewOwnArtwork` tinyint(1) unsigned NOT NULL DEFAULT 0,
`CanEditUsers` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`UserId`),
KEY `idxBenefits` (`CanAccessFeeds`,`CanVote`,`CanBulkDownload`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -3,8 +3,13 @@ CREATE TABLE IF NOT EXISTS `Users` (
`Email` varchar(80) DEFAULT NULL,
`Name` varchar(255) DEFAULT NULL,
`Created` timestamp NOT NULL DEFAULT current_timestamp(),
`Updated` timestamp NOT NULL DEFAULT current_timestamp() on update current_timestamp(),
`Uuid` char(36) NOT NULL DEFAULT (uuid()),
`PasswordHash` varchar(255) NULL,
PRIMARY KEY (`UserId`),
UNIQUE KEY `idxEmail` (`Email`)
UNIQUE KEY `idxEmail` (`Email`,`Uuid`,`UserId`),
UNIQUE KEY `idxUniqueEmail` (`Email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `se`.`Users`
ADD INDEX `idxUniqueEmail` (`Email` ASC) VISIBLE;
;