@ -170,6 +170,7 @@ func (app *appContext) ResetPassword(gc *gin.Context) {
data [ "helpMessage" ] = app . config . Section ( "ui" ) . Key ( "help_message" ) . String ( )
data [ "helpMessage" ] = app . config . Section ( "ui" ) . Key ( "help_message" ) . String ( )
data [ "successMessage" ] = app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( )
data [ "successMessage" ] = app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( )
data [ "jfLink" ] = app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( )
data [ "jfLink" ] = app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( )
data [ "redirectToJellyfin" ] = app . config . Section ( "ui" ) . Key ( "auto_redirect" ) . MustBool ( false )
data [ "validate" ] = app . config . Section ( "password_validation" ) . Key ( "enabled" ) . MustBool ( false )
data [ "validate" ] = app . config . Section ( "password_validation" ) . Key ( "enabled" ) . MustBool ( false )
data [ "requirements" ] = app . validator . getCriteria ( )
data [ "requirements" ] = app . validator . getCriteria ( )
data [ "strings" ] = app . storage . lang . PasswordReset [ lang ] . Strings
data [ "strings" ] = app . storage . lang . PasswordReset [ lang ] . Strings
@ -437,13 +438,18 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
fail ( )
fail ( )
return
return
}
}
gcHTML ( gc , http . StatusOK , "create-success.html" , gin . H {
jfLink := app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( )
"cssClass" : app . cssClass ,
if app . config . Section ( "ui" ) . Key ( "auto_redirect" ) . MustBool ( false ) {
"strings" : app . storage . lang . Form [ lang ] . Strings ,
gc . Redirect ( 301 , jfLink )
"successMessage" : app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( ) ,
} else {
"contactMessage" : app . config . Section ( "ui" ) . Key ( "contact_message" ) . String ( ) ,
gcHTML ( gc , http . StatusOK , "create-success.html" , gin . H {
"jfLink" : app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( ) ,
"cssClass" : app . cssClass ,
} )
"strings" : app . storage . lang . Form [ lang ] . Strings ,
"successMessage" : app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( ) ,
"contactMessage" : app . config . Section ( "ui" ) . Key ( "contact_message" ) . String ( ) ,
"jfLink" : jfLink ,
} )
}
inv , ok := app . storage . invites [ code ]
inv , ok := app . storage . invites [ code ]
if ok {
if ok {
l := len ( inv . Keys )
l := len ( inv . Keys )
@ -461,35 +467,36 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
matrix := matrixEnabled && app . config . Section ( "matrix" ) . Key ( "show_on_reg" ) . MustBool ( true )
matrix := matrixEnabled && app . config . Section ( "matrix" ) . Key ( "show_on_reg" ) . MustBool ( true )
data := gin . H {
data := gin . H {
"urlBase" : app . getURLBase ( gc ) ,
"urlBase" : app . getURLBase ( gc ) ,
"cssClass" : app . cssClass ,
"cssClass" : app . cssClass ,
"cssVersion" : cssVersion ,
"cssVersion" : cssVersion ,
"contactMessage" : app . config . Section ( "ui" ) . Key ( "contact_message" ) . String ( ) ,
"contactMessage" : app . config . Section ( "ui" ) . Key ( "contact_message" ) . String ( ) ,
"helpMessage" : app . config . Section ( "ui" ) . Key ( "help_message" ) . String ( ) ,
"helpMessage" : app . config . Section ( "ui" ) . Key ( "help_message" ) . String ( ) ,
"successMessage" : app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( ) ,
"successMessage" : app . config . Section ( "ui" ) . Key ( "success_message" ) . String ( ) ,
"jfLink" : app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( ) ,
"jfLink" : app . config . Section ( "ui" ) . Key ( "redirect_url" ) . String ( ) ,
"validate" : app . config . Section ( "password_validation" ) . Key ( "enabled" ) . MustBool ( false ) ,
"redirectToJellyfin" : app . config . Section ( "ui" ) . Key ( "auto_redirect" ) . MustBool ( false ) ,
"requirements" : app . validator . getCriteria ( ) ,
"validate" : app . config . Section ( "password_validation" ) . Key ( "enabled" ) . MustBool ( false ) ,
"email" : email ,
"requirements" : app . validator . getCriteria ( ) ,
"username" : ! app . config . Section ( "email" ) . Key ( "no_username" ) . MustBool ( false ) ,
"email" : email ,
"strings" : app . storage . lang . Form [ lang ] . Strings ,
"username" : ! app . config . Section ( "email" ) . Key ( "no_username" ) . MustBool ( false ) ,
"validationStrings" : app . storage . lang . Form [ lang ] . validationStringsJSON ,
"strings" : app . storage . lang . Form [ lang ] . Strings ,
"notifications" : app . storage . lang . Form [ lang ] . notificationsJSON ,
"validationStrings" : app . storage . lang . Form [ lang ] . validationStringsJSON ,
"code" : code ,
"notifications" : app . storage . lang . Form [ lang ] . notificationsJSON ,
"confirmation" : app . config . Section ( "email_confirmation" ) . Key ( "enabled" ) . MustBool ( false ) ,
"code" : code ,
"userExpiry" : inv . UserExpiry ,
"confirmation" : app . config . Section ( "email_confirmation" ) . Key ( "enabled" ) . MustBool ( false ) ,
"userExpiryMonths" : inv . UserMonths ,
"userExpiry" : inv . UserExpiry ,
"userExpiryDays" : inv . UserDays ,
"userExpiryMonths" : inv . UserMonths ,
"userExpiryHours" : inv . UserHours ,
"userExpiryDays" : inv . UserDays ,
"userExpiryMinutes" : inv . UserMinutes ,
"userExpiryHours" : inv . UserHours ,
"userExpiryMessage" : app . storage . lang . Form [ lang ] . Strings . get ( "yourAccountIsValidUntil" ) ,
"userExpiryMinutes" : inv . UserMinutes ,
"langName" : lang ,
"userExpiryMessage" : app . storage . lang . Form [ lang ] . Strings . get ( "yourAccountIsValidUntil" ) ,
"passwordReset" : false ,
"langName" : lang ,
"telegramEnabled" : telegram ,
"passwordReset" : false ,
"discordEnabled" : discord ,
"telegramEnabled" : telegram ,
"matrixEnabled" : matrix ,
"discordEnabled" : discord ,
"emailRequired" : app . config . Section ( "email" ) . Key ( "required" ) . MustBool ( false ) ,
"matrixEnabled" : matrix ,
"captcha" : app . config . Section ( "captcha" ) . Key ( "enabled" ) . MustBool ( false ) ,
"emailRequired" : app . config . Section ( "email" ) . Key ( "required" ) . MustBool ( false ) ,
"captcha" : app . config . Section ( "captcha" ) . Key ( "enabled" ) . MustBool ( false ) ,
}
}
if telegram {
if telegram {
data [ "telegramPIN" ] = app . telegram . NewAuthToken ( )
data [ "telegramPIN" ] = app . telegram . NewAuthToken ( )