1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-29 09:55:35 +02:00

Startup queries, foreign keys

This commit is contained in:
binwiederhier 2023-01-05 15:20:44 -05:00
parent 3280c2c440
commit 60f1882bec
14 changed files with 148 additions and 69 deletions

View file

@ -268,6 +268,7 @@ func execUserList(c *cli.Context) error {
func createUserManager(c *cli.Context) (*user.Manager, error) {
authFile := c.String("auth-file")
authStartupQueries := c.String("auth-startup-queries")
authDefaultAccess := c.String("auth-default-access")
if authFile == "" {
return nil, errors.New("option auth-file not set; auth is unconfigured for this server")
@ -278,7 +279,7 @@ func createUserManager(c *cli.Context) (*user.Manager, error) {
if err != nil {
return nil, errors.New("if set, auth-default-access must start set to 'read-write', 'read-only', 'write-only' or 'deny-all'")
}
return user.NewManager(authFile, authDefault)
return user.NewManager(authFile, authStartupQueries, authDefault)
}
func readPasswordAndConfirm(c *cli.Context) (string, error) {