mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 12:19:29 -05:00
Merge pull request #625 from Icinga:feature/add_support_for_user_with_at_sign
Feature: Adds support to provide user and domain with @ separated Adds support to provide the Icinga service user written as user@domain
This commit is contained in:
commit
df034a7e3e
2 changed files with 7 additions and 1 deletions
|
|
@ -19,6 +19,9 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
* [#617](https://github.com/Icinga/icinga-powershell-framework/issues/617) Fixes failing calls for plugins which use a switch argument like `-NoPerfData`, which is followed directly by the `-ThresholdInterval` argument
|
||||
* [#621](https://github.com/Icinga/icinga-powershell-framework/pull/621) Fixes `-ThresholdInterval` key detection on newer systems
|
||||
|
||||
### Enhancements
|
||||
|
||||
* [#623](https://github.com/Icinga/icinga-powershell-framework/issues/623) Adds support to provide the Icinga service user written as `user@domain`
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ function Set-IcingaServiceUser()
|
|||
return $FALSE;
|
||||
}
|
||||
|
||||
if ($User.Contains('\') -eq $FALSE) {
|
||||
if ($User.Contains('@')) {
|
||||
$UserData = $User.Split('@');
|
||||
$User = [string]::Format('{0}\{1}', $UserData[1], $UserData[0]);
|
||||
} elseif ($User.Contains('\') -eq $FALSE) {
|
||||
$User = [string]::Format('.\{0}', $User);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue