feat: safely control Shell Target
This commit is contained in:
@@ -112,6 +112,16 @@ func (systemIdentityEnvironment) LookupEnv(name string) (string, bool) {
|
||||
return os.LookupEnv(name)
|
||||
}
|
||||
|
||||
// SystemCurrentUser and SystemLookupUser expose the same injectable identity model
|
||||
// to user-scoped Target configuration without duplicating OS account parsing.
|
||||
func SystemCurrentUser() (UserIdentity, error) {
|
||||
return systemIdentityEnvironment{}.CurrentUser()
|
||||
}
|
||||
|
||||
func SystemLookupUser(name string) (UserIdentity, error) {
|
||||
return systemIdentityEnvironment{}.LookupUser(name)
|
||||
}
|
||||
|
||||
func ConfigPath() (string, error) {
|
||||
configuration, err := ResolveConfigurationForCurrentProcess()
|
||||
return configuration.Path, err
|
||||
|
||||
Reference in New Issue
Block a user