mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
inactive cursors access control.
This commit is contained in:
@ -9,12 +9,14 @@ import (
|
||||
func New() types.MemberProvider {
|
||||
return &MemberProviderCtx{
|
||||
profile: types.MemberProfile{
|
||||
IsAdmin: true,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
IsAdmin: true,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
SendsInactiveCursor: true,
|
||||
CanSeeInactiveCursors: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -22,26 +22,30 @@ func (provider *MemberProviderCtx) Connect() error {
|
||||
if provider.config.AdminPassword != "" {
|
||||
// create default admin account at startup
|
||||
_, err = provider.Insert("admin", provider.config.AdminPassword, types.MemberProfile{
|
||||
Name: "Administrator",
|
||||
IsAdmin: true,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
Name: "Administrator",
|
||||
IsAdmin: true,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
SendsInactiveCursor: true,
|
||||
CanSeeInactiveCursors: true,
|
||||
})
|
||||
}
|
||||
|
||||
if provider.config.UserPassword != "" {
|
||||
// create default user account at startup
|
||||
_, err = provider.Insert("user", provider.config.UserPassword, types.MemberProfile{
|
||||
Name: "User",
|
||||
IsAdmin: false,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
Name: "User",
|
||||
IsAdmin: false,
|
||||
CanLogin: true,
|
||||
CanConnect: true,
|
||||
CanWatch: true,
|
||||
CanHost: true,
|
||||
CanAccessClipboard: true,
|
||||
SendsInactiveCursor: true,
|
||||
CanSeeInactiveCursors: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user