MCPcopy Create free account
hub / github.com/PowerShell/DSC / get_security_context

Function get_security_context

lib/dsc-lib-security_context/src/lib.rs:12–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10#[cfg(target_os = "windows")]
11#[must_use]
12pub fn get_security_context() -> SecurityContext {
13 use is_elevated::is_elevated;
14 if is_elevated() {
15 return SecurityContext::Admin;
16 }
17 SecurityContext::User
18}
19
20#[cfg(not(target_os = "windows"))]
21#[must_use]

Callers 3

check_security_contextFunction · 0.85
newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected