WIP: Add users system, required for uploading new pastes #77

Draft
yorick wants to merge 8 commits from yorick/rushlink:users into master
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 0643176ed1 - Show all commits

View File

@ -33,7 +33,7 @@ func main() {
} }
if err := db.CreateAdminUser(database, "admin"); err != nil { if err := db.CreateAdminUser(database, "admin"); err != nil {
Review

I would be fine with a command line option that allows the operator to create users.

I would be fine with a command line option that allows the operator to create users.
log.Fatalln(err) log.Fatalln(err)
yorick marked this conversation as resolved
Review

(not go fmted)

(not `go fmt`ed)
} }
go rushlink.StartMetricsServer(*metricsListen, database, filestore) go rushlink.StartMetricsServer(*metricsListen, database, filestore)

View File

@ -39,7 +39,7 @@ type FileUpload struct {
PubID uuid.UUID `gorm:"uniqueIndex"` PubID uuid.UUID `gorm:"uniqueIndex"`
// User ID that created this file // User ID that created this file
CreatedBy uint `gorm:"index"` CreatedBy uint `gorm:"index"`
yorick marked this conversation as resolved
Review

(not go fmted)

(not `go fmt`ed)
// FileName contains the original filename of this FileUpload. // FileName contains the original filename of this FileUpload.
FileName string FileName string

View File

@ -24,7 +24,7 @@ type Paste struct {
ID uint `gorm:"primaryKey"` ID uint `gorm:"primaryKey"`
Type PasteType `gorm:"index"` Type PasteType `gorm:"index"`
State PasteState `gorm:"index"` State PasteState `gorm:"index"`
CreatedBy uint `gorm:"index"` CreatedBy uint `gorm:"index"`
Content []byte Content []byte
Key string `gorm:"uniqueIndex"` Key string `gorm:"uniqueIndex"`
DeleteToken string DeleteToken string