dummy allow all logins.

This commit is contained in:
Miroslav Šedivý 2021-03-14 13:06:33 +01:00
parent bf560d5289
commit f57332ba2a

View File

@ -1,6 +1,8 @@
package dummy
import (
"fmt"
"demodesk/neko/internal/types"
)
@ -19,29 +21,37 @@ func (manager *MemberManagerCtx) Disconnect() error {
}
func (manager *MemberManagerCtx) Authenticate(username string, password string) (string, types.MemberProfile, error) {
return username, types.MemberProfile{}, nil
return username, types.MemberProfile{
Name: username,
IsAdmin: true,
CanLogin: true,
CanConnect: true,
CanWatch: true,
CanHost: true,
CanAccessClipboard: true,
}, nil
}
func (manager *MemberManagerCtx) Insert(username string, password string, profile types.MemberProfile) (string, error) {
return "", nil
return "", fmt.Errorf("Not implemented.")
}
func (manager *MemberManagerCtx) Select(id string) (types.MemberProfile, error) {
return types.MemberProfile{}, nil
return types.MemberProfile{}, fmt.Errorf("Not implemented.")
}
func (manager *MemberManagerCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {
return map[string]types.MemberProfile{}, nil
return map[string]types.MemberProfile{}, fmt.Errorf("Not implemented.")
}
func (manager *MemberManagerCtx) Update(id string, profile types.MemberProfile) error {
return nil
return fmt.Errorf("Not implemented.")
}
func (manager *MemberManagerCtx) UpdatePassword(id string, passwrod string) error {
return nil
return fmt.Errorf("Not implemented.")
}
func (manager *MemberManagerCtx) Delete(id string) error {
return nil
return fmt.Errorf("Not implemented.")
}