mac admin auth check

This commit is contained in:
21pages
2023-02-25 04:55:37 -08:00
parent 17f1c18c92
commit b9b4913ca0
3 changed files with 41 additions and 3 deletions

View File

@@ -707,10 +707,10 @@ pub fn is_root() -> bool {
pub fn check_super_user_permission() -> bool {
#[cfg(feature = "flatpak")]
return true;
#[cfg(any(windows, target_os = "linux"))]
#[cfg(any(windows, target_os = "linux", target_os = "macos"))]
return crate::platform::check_super_user_permission().unwrap_or(false);
#[cfg(not(any(windows, target_os = "linux")))]
true
#[cfg(not(any(windows, target_os = "linux", target_os = "macos")))]
return true;
}
#[allow(dead_code)]