mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-28 23:51:07 +03:00
add options: disable-change-permanent-password, disable-change-id, disable-unlock-pin (#13929)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -406,6 +406,10 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
println!("Settings are disabled!");
|
||||
return None;
|
||||
}
|
||||
if config::Config::is_disable_change_permanent_password() {
|
||||
println!("Changing permanent password is disabled!");
|
||||
return None;
|
||||
}
|
||||
if args.len() == 2 {
|
||||
if crate::platform::is_installed() && is_root() {
|
||||
if let Err(err) = crate::ipc::set_permanent_password(args[1].to_owned()) {
|
||||
@@ -419,6 +423,10 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--set-unlock-pin" {
|
||||
if config::Config::is_disable_unlock_pin() {
|
||||
println!("Unlock PIN is disabled!");
|
||||
return None;
|
||||
}
|
||||
#[cfg(feature = "flutter")]
|
||||
if args.len() == 2 {
|
||||
if crate::platform::is_installed() && is_root() {
|
||||
@@ -440,6 +448,10 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
println!("Settings are disabled!");
|
||||
return None;
|
||||
}
|
||||
if config::Config::is_disable_change_id() {
|
||||
println!("Changing ID is disabled!");
|
||||
return None;
|
||||
}
|
||||
if args.len() == 2 {
|
||||
if crate::platform::is_installed() && is_root() {
|
||||
let old_id = crate::ipc::get_id();
|
||||
|
||||
Reference in New Issue
Block a user