remove control protection.

This commit is contained in:
Miroslav Šedivý
2024-04-21 20:16:09 +02:00
parent 5c683fb1b8
commit 014b68e1fb
3 changed files with 2 additions and 58 deletions

View File

@ -9,8 +9,6 @@ type WebSocket struct {
Password string
AdminPassword string
Locks []string
ControlProtection bool
}
func (WebSocket) Init(cmd *cobra.Command) error {
@ -29,11 +27,6 @@ func (WebSocket) Init(cmd *cobra.Command) error {
return err
}
cmd.PersistentFlags().Bool("control_protection", false, "control protection means, users can gain control only if at least one admin is in the room")
if err := viper.BindPFlag("control_protection", cmd.PersistentFlags().Lookup("control_protection")); err != nil {
return err
}
return nil
}
@ -41,6 +34,4 @@ func (s *WebSocket) Set() {
s.Password = viper.GetString("password")
s.AdminPassword = viper.GetString("password_admin")
s.Locks = viper.GetStringSlice("locks")
s.ControlProtection = viper.GetBool("control_protection")
}