]> Kevux Git Server - koopa/commitdiff
Progress: standard path design, database accounts, database logging, and other fixes
authorKevin Day <thekevinday@gmail.com>
Tue, 2 May 2017 21:42:03 +0000 (16:42 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 2 May 2017 21:42:03 +0000 (16:42 -0500)
Move all of the execute parameters into the c_standard_path class so that it does not have to be passed to every function.
- Down the road, I may just have the execution function without parameters and use a separate function for assigning the parameters to the class.

Make sure the database accounts exist in the user table.
- Ldap synchronization on login is now functioning.
- Non-LDAP does not synchronize or change account settings on login.
- There is currently no 3rd-party database/structure/design to use as a basis for auto-assigning roles, therefore roles must be manually assigned to the each user.
  - This manual assignment will still auto-update the postgresql roles, so only the is_* columns need to be altered and postgresql roles will automatically follow via triggers.

The first part of the database logging is setup and working.
- There is much more work to do.

Other fixes and changes.

13 files changed:
common/standard/classes/standard_index.php
common/standard/classes/standard_path.php
common/standard/internal/access_denied.php
common/standard/internal/bad_method.php
common/standard/internal/index.php
common/standard/internal/not_found.php
common/standard/internal/server_error.php
common/standard/paths/u/dashboard.php
common/standard/paths/u/login.php
common/standard/paths/u/logout.php
database/sql/reservation/reservation-users.sql
database/sql/standard/standard-users.sql
program/reservation/index.php

index 26473f0ca3969b5e3893c2a464bfb38382af6aa0..79f37f9bb8a7968600ed3d46e37cafc9efd7b31b 100644 (file)
@@ -85,6 +85,10 @@ class c_standard_index extends c_base_return {
       $this->settings['base_scheme'] = 'http';
     }
 
+    // theme information
+    $this->settings['system_name'] = $this->settings['session_system'];
+    $this->settings['base_css'] = 'standard-';
+
     // The HTML tag <p>, represents a paragraph.
     // However, many sites, services, and developers incorrectly use it to represent text.
     // The definition of the word 'paragraph' contradicts this current usage of the HTML tag <p>.
index 973f34510b3f3626fdc0b8bb962d792511a23a2e..410ad1c2ac5bcef6d1064a26a2a0f782ab4777f4 100644 (file)
@@ -12,7 +12,6 @@ require_once('common/base/classes/base_markup.php');
  * Provides standard extensions to base paths.
  */
 class c_standard_path extends c_base_path {
-  protected const CSS_BASE = 'standard-';
   protected const CSS_NAME = 'content-wrapper';
 
   protected const CSS_AS_TITLE            = 'as-title';
@@ -36,8 +35,10 @@ class c_standard_path extends c_base_path {
   protected const CSS_PATH_PART = 'path-part-';
   protected const CSS_PATH_FULL = 'path-full-';
 
-  protected $use_p_tags = NULL;
-  protected $base_path  = NULL;
+  protected $http;
+  protected $database;
+  protected $session;
+  protected $settings;
 
 
   /**
@@ -46,16 +47,20 @@ class c_standard_path extends c_base_path {
   public function __construct() {
     parent::__construct();
 
-    $this->use_p_tags = FALSE;
-    $this->base_path  = '';
+    $this->http     = NULL;
+    $this->database = NULL;
+    $this->session  = NULL;
+    $this->settings = array();
   }
 
   /**
    * Class destructor.
    */
   public function __destruct() {
-    unset($this->use_p_tags);
-    unset($this->base_path);
+    unset($this->http);
+    unset($this->database);
+    unset($this->session);
+    unset($this->settings);
 
     parent::__destruct();
   }
@@ -63,17 +68,20 @@ class c_standard_path extends c_base_path {
   /**
    * Load any default settings.
    *
+   * @param c_base_http $http
+   *   The entire HTTP information to allow for the execution to access anything that is necessary.
+   * @param c_base_database $database
+   *   The database object, which is usually used by form and ajax paths.
+   * @param c_base_session &$session
+   *   The current session.
    * @param array $settings
-   *   The array containing all of the settings to parse.
+   *   (optional) An array of additional settings that are usually site-specific.
    */
-  protected function pr_assign_defaults($settings) {
-    if (isset($settings['standards_issue-use_p_tags']) && is_bool($settings['standards_issue-use_p_tags'])) {
-      $this->use_p_tags = $settings['standards_issue-use_p_tags'];
-    }
-
-    if (isset($settings['base_path']) && is_string($settings['base_path'])) {
-      $this->base_path = $settings['base_path'];
-    }
+  protected function pr_assign_defaults(&$http, &$database, &$session, &$settings) {
+    $this->http = $http;
+    $this->database = $database;
+    $this->session = $session;
+    $this->settings = $settings;
   }
 
   /**
@@ -83,7 +91,7 @@ class c_standard_path extends c_base_path {
    *   The generated markup tag.
    */
   protected function pr_create_tag_wrapper() {
-    return c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SECTION, self::CSS_BASE . self::CSS_NAME, array(self::CSS_BASE . self::CSS_NAME,  self::CSS_NAME));
+    return c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SECTION, $this->settings['base_css'] . self::CSS_NAME, array($this->settings['base_css'] . self::CSS_NAME,  self::CSS_NAME));
   }
 
   /**
@@ -128,7 +136,7 @@ class c_standard_path extends c_base_path {
    */
   protected function pr_create_tag_text($text, $arguments = array()) {
     $type = c_base_markup_tag::TYPE_SPAN;
-    if ($this->use_p_tags) {
+    if (isset($this->settings['standards_issue-use_p_tags']) && $this->settings['standards_issue-use_p_tags']) {
       $type = c_base_markup_tag::TYPE_PARAGRAPH;
     }
 
@@ -152,7 +160,7 @@ class c_standard_path extends c_base_path {
    */
   protected function pr_create_tag_paragraph($text, $arguments = array()) {
     $type = c_base_markup_tag::TYPE_SPAN;
-    if ($this->use_p_tags) {
+    if (isset($this->settings['standards_issue-use_p_tags']) && $this->settings['standards_issue-use_p_tags']) {
       $type = c_base_markup_tag::TYPE_PARAGRAPH;
     }
 
@@ -180,7 +188,7 @@ class c_standard_path extends c_base_path {
 
     if (!is_null($text)) {
       $type = c_base_markup_tag::TYPE_SPAN;
-      if ($this->use_p_tags) {
+      if (isset($this->settings['standards_issue-use_p_tags']) && $this->settings['standards_issue-use_p_tags']) {
         $type = c_base_markup_tag::TYPE_PARAGRAPH;
       }
 
@@ -216,7 +224,7 @@ class c_standard_path extends c_base_path {
 
     if (!is_null($text)) {
       $type = c_base_markup_tag::TYPE_SPAN;
-      if ($this->use_p_tags) {
+      if (isset($this->settings['standards_issue-use_p_tags']) && $this->settings['standards_issue-use_p_tags']) {
         $type = c_base_markup_tag::TYPE_PARAGRAPH;
       }
 
@@ -266,37 +274,28 @@ class c_standard_path extends c_base_path {
   /**
    * Create a new HTML markup class with default settings populated.
    *
-   * @param c_base_http $http
-   *   The entire HTTP information to allow for the execution to access anything that is necessary.
-   * @param c_base_database $database
-   *   The database object, which is usually used by form and ajax paths.
-   * @param c_base_session &$session
-   *   The current session.
-   * @param array $settings
-   *   An array of additional settings that are usually site-specific.
-   *
    * @return c_base_html
    *   The generated html is returned on success.
    *   The generated html with error bit set is returned on error.
    */
-  protected function pr_create_html(&$http, &$database, &$session, $settings) {
+  protected function pr_create_html() {
     $title = $this->pr_get_title();
 
     $html = new c_base_html();
 
-    $request_uri = $http->get_request(c_base_http::REQUEST_URI)->get_value_exact();
+    $request_uri = $this->http->get_request(c_base_http::REQUEST_URI)->get_value_exact();
     if (isset($request_uri['data']) && is_string($request_uri['data'])) {
       $request_uri = $request_uri['data'];
       unset($request_uri['current']);
       unset($request_uri['invalid']);
 
-      $request_path = $http->get_request_uri_relative($settings['base_path'])->get_value_exact();
+      $request_path = $this->http->get_request_uri_relative($this->settings['base_path'])->get_value_exact();
     }
     else {
       $request_uri = array(
-        'scheme' => $settings['base_scheme'],
-        'authority' => $settings['base_host'],
-        'path' => $settings['base_path'],
+        'scheme' => $this->settings['base_scheme'],
+        'authority' => $this->settings['base_host'],
+        'path' => $this->settings['base_path'],
         'query' => NULL,
         'fragment' => NULL,
         'url' => TRUE,
@@ -317,7 +316,7 @@ class c_standard_path extends c_base_path {
     unset($instance);
 
     // add path classes
-    $path = $http->get_request_uri_relative($request_uri['path'])->get_value_exact();
+    $path = $this->http->get_request_uri_relative($request_uri['path'])->get_value_exact();
     $path_parts = explode('/', $path);
 
     if (is_array($path_parts)) {
@@ -338,18 +337,23 @@ class c_standard_path extends c_base_path {
     }
     unset($path_parts);
 
+    $class[] = self::CSS_IS_CONTENT_TYPE;
+    $class[] = self::CSS_IS_JAVASCRIPT_DISABLED;
+
     $html->set_attribute_body(c_base_markup_attributes::ATTRIBUTE_CLASS, $class);
     unset($class);
 
 
     // assign id attribute
-    #$html->set_attribute(c_base_markup_attributes::ATTRIBUTE_ID, 'example-system');
-    #$html->set_attribute_body(c_base_markup_attributes::ATTRIBUTE_ID, 'example-system-body');
+    $id = $html->sanitize_css('system-' . $this->settings['session_system'])->get_value_exact();
+    #$html->set_attribute(c_base_markup_attributes::ATTRIBUTE_ID, $id);
+    $html->set_attribute_body(c_base_markup_attributes::ATTRIBUTE_ID, $id);
+    unset($id);
 
 
     // assign language attribute.
     $language = i_base_languages::ENGLISH_US;
-    $languages = $http->get_response_content_language()->get_value_exact();
+    $languages = $this->http->get_response_content_language()->get_value_exact();
     if (is_array($languages) && !empty($languages)) {
       $language = reset($languages);
     }
index 4ad079c5ac02ed4d5756be8aaf5ce4ebd4d7255e..f9705012c38c0723b683372808fdaac2d5f1f1d0 100644 (file)
@@ -23,7 +23,7 @@ class c_standard_path_access_denied extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -31,7 +31,7 @@ class c_standard_path_access_denied extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index 5ab2554bf48d1ef7fb319fd7b97b31df06a4e07b..8c580c305d832dac4602f6623bafb25caac3cad7 100644 (file)
@@ -25,7 +25,7 @@ class c_standard_path_bad_method extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -33,7 +33,7 @@ class c_standard_path_bad_method extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index a487f0413b40738e188ef3f80ca545dad2cd3709..fed98146a56315d57be0a6c4fa0150b22b3aeac1 100644 (file)
@@ -24,7 +24,7 @@ class c_standard_path_index extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -32,7 +32,7 @@ class c_standard_path_index extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index b51b38b712708eedee9cd474012c2e009eb7c926..73533e4a663814ccccbd04df021301bc7223cb01 100644 (file)
@@ -23,7 +23,7 @@ class c_standard_path_not_found extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -31,7 +31,7 @@ class c_standard_path_not_found extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index 4c3d52d5507aba8bb78c027b1b404b11ff9593bb..25a484a0948e2ac551abcd8c668cb0f21459585a 100644 (file)
@@ -23,7 +23,7 @@ class c_standard_path_server_error extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -31,7 +31,7 @@ class c_standard_path_server_error extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index caf7b7c3666bc2991ed20e523138c5d36a44fafb..12e38199e9e4796aea3476a10d5e89faafbf0301 100644 (file)
@@ -22,9 +22,9 @@ class c_standard_path_user_dashboard extends c_standard_path {
     $executed = parent::do_execute($http, $database, $session, $settings);
     if (c_base_return::s_has_error($executed)) {
       return $executed;
-    }
+    };
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     $wrapper = $this->pr_create_tag_wrapper();
     $wrapper->set_tag($this->pr_create_tag_title(0));
@@ -36,9 +36,11 @@ class c_standard_path_user_dashboard extends c_standard_path {
 
 
     $roles = array();
-    if ($current_user instanceof c_base_users) {
-      $roles = $current_user->get_roles();
+    if ($current_user instanceof c_base_users_user) {
+      $roles = $current_user->get_roles()->get_value_exact();
     }
+    unset($current_user);
+    #unset($session_user);
 
     $wrapper->set_tag($this->pr_create_tag_text_block($this->pr_get_text(2, array('@{user}' => $session->get_name()->get_value_exact()))));
 
@@ -101,7 +103,7 @@ class c_standard_path_user_dashboard extends c_standard_path {
     unset($block);
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
 
     $executed->set_output($html);
index 5ebab109d02eef0fcceeb5c05e88a9e43e4ec08e..09e17f0dcd44dd68446206f26fd6bb35ba1a6a5b 100644 (file)
@@ -40,10 +40,10 @@ class c_standard_path_user_login extends c_standard_path {
       return $executed;
     }
 
-    $this->pr_assign_defaults($settings);
+    $this->pr_assign_defaults($http, $database, $session, $settings);
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $wrapper = $this->pr_create_tag_wrapper();
 
     $logged_in = $session->is_logged_in()->get_value_exact();
@@ -79,7 +79,7 @@ class c_standard_path_user_login extends c_standard_path {
 
         $href = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A);
         $href->set_text($this->pr_get_text(6));
-        $href->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $this->base_path . self::PATH_LOGOUT);
+        $href->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $settings['base_path'] . self::PATH_LOGOUT);
         $block->set_tag($href);
         unset($href);
 
@@ -440,6 +440,16 @@ class c_standard_path_user_login extends c_standard_path {
     else {
       c_standard_index::s_do_initialize_database($database);
 
+      // if LDAP is available, make sure the account information exists.
+      $ldap = $this->pr_load_ldap_data($settings, $_POST['login_form-username']);
+      if ($ldap['status']) {
+        $this->pr_update_user_data($database, $ldap);
+      }
+      else {
+        $this->pr_update_user_data($database);
+      }
+      unset($ldap);
+
       if ($database instanceof c_standard_database) {
         $database->do_log_user(c_base_log::TYPE_CONNECT, c_base_http_status::OK, array('expires' => $session->get_timeout_expire()->get_value_exact()));
       }
@@ -682,16 +692,6 @@ class c_standard_path_user_login extends c_standard_path {
    *   FALSE with error bit set is returned on error.
    */
   protected function pr_do_ensure_user_account($settings, $user_name) {
-    if (!is_array($settings)) {
-      $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'settings', ':{function_name}' => __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
-      return c_base_return_error::s_false($error);
-    }
-
-    if (!is_string($user_name)) {
-      $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'user_name', ':{function_name}' => __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
-      return c_base_return_error::s_false($error);
-    }
-
     $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
     if (!is_resource($socket)) {
       unset($socket);
@@ -814,6 +814,60 @@ class c_standard_path_user_login extends c_standard_path {
   }
 
   /**
+   * Ensure that the user data exists and is up to date.
+   *
+   * @param c_base_database &$database
+   *   The database object.
+   * @param array|null $ldap
+   *   (optional) When NULL, the user data is only ensure to exist.
+   *   When an array, the given ldap information is used to update the account.
+   *
+   * @return c_base_return_status
+   *   TRUE on success, FALSE otherwise.
+   */
+  protected function pr_update_user_data(&$database, $ldap = NULL) {
+    $query_result = $database->do_query('select id from v_users_self_exists');
+    if ($query_result instanceof c_base_database_result) {
+      if (is_array($ldap)) {
+        $query_arguments = array();
+
+        $email = explode('@', $ldap['data']['mail']);
+        if (count($email) != 2) {
+          $email[0] = NULL;
+          $email[1] = NULL;
+        }
+
+        $query_arguments[] = isset($ldap['data']['employeenumber']) && is_numeric($ldap['data']['employeenumber']) ? (int) $ldap['data']['employeenumber'] : NULL;;
+        $query_arguments[] = isset($ldap['data']['givenname']) && is_string($ldap['data']['givenname']) ? $ldap['data']['givenname'] : NULL;
+        $query_arguments[] = isset($ldap['data']['sn']) && is_string($ldap['data']['sn']) ? $ldap['data']['sn'] : NULL;
+        $query_arguments[] = isset($ldap['data']['gecos']) && is_string($ldap['data']['gecos']) ? $ldap['data']['gecos'] : NULL;
+        $query_arguments[] = $email[0];
+        $query_arguments[] = $email[1];
+        unset($email);
+
+        // if the user account does not exist, then create it.
+        if ($query_result->fetch_row()->get_value() === FALSE) {
+          $query_string = 'insert into v_users_self_insert (id_external, name_human.first, name_human.last, name_human.complete, address_email.name, address_email.domain, address_email.private) values ($1, $2, $3, $4, $5, $6, $7)';
+          $query_arguments[] = 't';
+        }
+        else {
+          $query_string = 'update v_users_self_update set id_external = $1, name_human.first = $2, name_human.last = $3, name_human.complete = $4, address_email.name = $5, address_email.domain = $6';
+        }
+
+        $database->do_query($query_string, $query_arguments);
+        unset($query_string);
+        unset($query_arguments);
+      }
+      else {
+        if ($query_result->fetch_row()->get_value() === FALSE) {
+          $database->do_query('insert into v_users_self_insert (id_external, name_human.first, name_human.last, name_human.complete, address_email.name, address_email.domain, address_email.private) values (null, null, null, null, null, null, true)');
+        }
+      }
+    }
+    unset($query_result);
+  }
+
+  /**
    * Implements pr_get_text().
    */
   protected function pr_get_text($code, $arguments = array()) {
index 25d3cfe39cd64cb3e875a10a46b498fda185634b..f70009074179b5bd6d475c26af9776446112bcc9 100644 (file)
@@ -9,6 +9,7 @@ require_once('common/base/classes/base_return.php');
 require_once('common/base/classes/base_path.php');
 require_once('common/base/classes/base_http_status.php');
 require_once('common/base/classes/base_cookie.php');
+require_once('common/base/classes/base_log.php');
 
 require_once('common/standard/classes/standard_path.php');
 require_once('common/standard/classes/standard_database.php');
@@ -40,7 +41,7 @@ class c_standard_path_user_logout extends c_standard_path {
 
 
     // initialize the content as HTML.
-    $html = $this->pr_create_html($http, $database, $session, $settings);
+    $html = $this->pr_create_html();
     $html->set_tag($wrapper);
     unset($wrapper);
 
index 7ec5db5f23071aafc7ac2f48eab19281dcac8b57..0f4ad01d2a2a175b37ac2b0c9ef41d3842b6321c 100644 (file)
@@ -130,6 +130,12 @@ create view public.v_users_self_locked_not with (security_barrier=true) as
 
 grant select on public.v_users_self_locked_not to r_reservation, r_reservation_system, r_reservation_public;
 
+create view public.v_users_self_exists with (security_barrier=true) as
+  select id, name_machine, is_system, is_public, is_locked, is_deleted from s_tables.t_users
+    where (name_machine)::text = (current_user)::text;
+
+grant select on public.v_users_self_exists to r_reservation, r_reservation_system, r_reservation_public;
+
 create view s_users.v_users_self_insert with (security_barrier=true) as
   select id_external, name_human, address_email, is_private, settings from s_tables.t_users
     where not is_deleted and not is_locked and not is_system and not is_public and (name_machine)::text = (current_user)::text
@@ -138,7 +144,7 @@ create view s_users.v_users_self_insert with (security_barrier=true) as
 grant insert on s_users.v_users_self_insert to r_reservation, r_reservation_system;
 
 create view s_users.v_users_self_update with (security_barrier=true) as
-  select address_email, is_private, settings from s_tables.t_users
+  select id_external, name_human, address_email, is_private, settings from s_tables.t_users
     where not is_deleted and not is_locked and not is_system and not is_public and (name_machine)::text = (current_user)::text
     with check option;
 
index 827142aa46c71d0088dfb608c6f260a0b8671964..0f6353d5c2fcb34929d3fd92e7c8e8fe318aa16b 100644 (file)
@@ -130,6 +130,12 @@ create view public.v_users_self_locked_not with (security_barrier=true) as
 
 grant select on public.v_users_self_locked_not to r_standard, r_standard_system, r_standard_public;
 
+create view public.v_users_self_exists with (security_barrier=true) as
+  select id, name_machine, is_system, is_public, is_locked, is_deleted from s_tables.t_users
+    where (name_machine)::text = (current_user)::text;
+
+grant select on public.v_users_self_exists to r_standard, r_standard_system, r_standard_public;
+
 create view s_users.v_users_self_insert with (security_barrier=true) as
   select id_external, name_human, address_email, is_private, settings from s_tables.t_users
     where not is_deleted and not is_locked and not is_system and not is_public and (name_machine)::text = (current_user)::text
index 478ac8a73b261e275c21a13ce56def6695857b39..98a65c3b06c9fb848b28d3b12f1e45108a24aff0 100644 (file)
@@ -25,6 +25,9 @@ class c_reservation_index extends c_standard_index {
     $this->settings['session_system'] = 'reservation';
 
     $this->settings['cookie_name'] = 'reservation-session';
+
+    $this->settings['system_name'] = $this->settings['session_system'];
+    $this->settings['base_css'] = 'reservation-';
   }
 }