mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 04:30:08 +02:00
Fixed further inspection issues
This commit is contained in:
parent
33e36f3d2b
commit
87533b6031
37 changed files with 46 additions and 71 deletions
|
@ -75,6 +75,7 @@ class ConsoleEnsureWebserverUserListener
|
|||
}
|
||||
}
|
||||
|
||||
/** @noinspection PhpUndefinedFunctionInspection */
|
||||
private function isRunningAsRoot(): bool
|
||||
{
|
||||
//If we are on windows, we can't run as root
|
||||
|
@ -96,6 +97,7 @@ class ConsoleEnsureWebserverUserListener
|
|||
* Determines the username of the user who started the current script if possible.
|
||||
* Returns null if the username could not be determined.
|
||||
* @return string|null
|
||||
* @noinspection PhpUndefinedFunctionInspection
|
||||
*/
|
||||
private function getRunningUser(): ?string
|
||||
{
|
||||
|
@ -126,6 +128,7 @@ class ConsoleEnsureWebserverUserListener
|
|||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
//If we have the COM extension available, we can use it to determine the owner
|
||||
if (extension_loaded('com_dotnet')) {
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
$su = new \COM("ADsSecurityUtility"); // Call interface
|
||||
//@phpstan-ignore-next-line
|
||||
$securityInfo = $su->GetSecurityDescriptor($path_to_check, 1, 1); // Call method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue