Skip to content
Snippets Groups Projects
Unverified Commit 9882dfc4 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[bug] anon needs no credentials

parent 70922083
No related branches found
No related tags found
1 merge request!105Sip login
...@@ -24,7 +24,7 @@ ApplicationWindow { ...@@ -24,7 +24,7 @@ ApplicationWindow {
console.debug(jsonModel.getJson()) console.debug(jsonModel.getJson())
login.visible = true login.visible = true
} }
if (ctx.loginOk == 'true' && loginDone == false) { if (ctx.loginOk == 'true') {
loginOk.visible = true loginOk.visible = true
} }
if (ctx.errors ) { if (ctx.errors ) {
......
...@@ -17,7 +17,7 @@ func Login(username, password string) { ...@@ -17,7 +17,7 @@ func Login(username, password string) {
success, err := ctx.bm.DoLogin(username, password) success, err := ctx.bm.DoLogin(username, password)
if err != nil { if err != nil {
log.Printf("Error on login: %v", err) log.Printf("Error on login: %v", err)
ctx.Errors = "bad_auth_unknown" ctx.Errors = "bad_auth"
} else if success { } else if success {
log.Printf("Logged in as %s", username) log.Printf("Logged in as %s", username)
ctx.LoginOk = true ctx.LoginOk = true
...@@ -73,13 +73,11 @@ func InitializeBitmaskContext(opts *InitOpts) { ...@@ -73,13 +73,11 @@ func InitializeBitmaskContext(opts *InitOpts) {
opts.AppName = p.AppName opts.AppName = p.AppName
initOnce.Do(func() { initializeContext(opts) }) initOnce.Do(func() { initializeContext(opts) })
runDonationReminder()
if ctx.bm != nil { if ctx.bm != nil {
if ctx.bm.NeedsCredentials() { ctx.LoginDialog = ctx.bm.NeedsCredentials()
ctx.LoginDialog = true
}
go ctx.updateStatus() go ctx.updateStatus()
} }
runDonationReminder()
} }
func RefreshContext() *C.char { func RefreshContext() *C.char {
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
type anonymousAuthentication struct{} type anonymousAuthentication struct{}
func (a *anonymousAuthentication) needsCredentials() bool { func (a *anonymousAuthentication) needsCredentials() bool {
return true return false
} }
func (a *anonymousAuthentication) getToken(user, password string) ([]byte, error) { func (a *anonymousAuthentication) getToken(user, password string) ([]byte, error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment