ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilUseRootConfirmed Class Reference

The user seems to use root or we cannot determine which user he uses. More...

+ Inheritance diagram for ilUseRootConfirmed:
+ Collaboration diagram for ilUseRootConfirmed:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Detailed Description

The user seems to use root or we cannot determine which user he uses.

We should ask...

Definition at line 11 of file class.ilUseRootConfirmed.php.

Member Function Documentation

◆ achieve()

ilUseRootConfirmed::achieve ( Setup\Environment  $environment)

Definition at line 51 of file class.ilUseRootConfirmed.php.

References $message, and ILIAS\Setup\Environment\getResource().

51  : Setup\Environment
52  {
53  if (function_exists("posix_geteuid") && posix_geteuid() != 0) {
54  return $environment;
55  }
56 
57  $admin_interaction = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
58 
59  $message =
60  "You seem to be using root or your user just can't be determined. You should\n" .
61  "be running this setup with the same user the webserver uses. If this is not\n" .
62  "the case there might be problems accessing files via the web later...\n";
63 
64  if (!$admin_interaction->confirmOrDeny($message)) {
65  throw new Setup\NoConfirmationException($message);
66  }
67 
68  return $environment;
69  }
$message
Definition: xapiexit.php:14
+ Here is the call graph for this function:

◆ getHash()

ilUseRootConfirmed::getHash ( )

Definition at line 16 of file class.ilUseRootConfirmed.php.

16  : string
17  {
18  return hash(
19  "sha256",
20  get_class($this)
21  );
22  }

◆ getLabel()

ilUseRootConfirmed::getLabel ( )

Definition at line 27 of file class.ilUseRootConfirmed.php.

27  : string
28  {
29  return "Confirm that root should be used to run the setup.";
30  }

◆ getPreconditions()

ilUseRootConfirmed::getPreconditions ( Setup\Environment  $environment)

Definition at line 43 of file class.ilUseRootConfirmed.php.

43  : array
44  {
45  return [];
46  }

◆ isNotable()

ilUseRootConfirmed::isNotable ( )

Definition at line 35 of file class.ilUseRootConfirmed.php.

35  : bool
36  {
37  return false;
38  }

The documentation for this class was generated from the following file: