]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Implement users management from web interface
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 29 Dec 2015 23:10:51 +0000 (00:10 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Tue, 29 Dec 2015 23:10:51 +0000 (00:10 +0100)
16 files changed:
gui/baculum/protected/Class/ConfigurationManager.php
gui/baculum/protected/JavaScript/misc.js
gui/baculum/protected/JavaScript/panel-window.js
gui/baculum/protected/Lang/en/messages.mo
gui/baculum/protected/Lang/en/messages.po
gui/baculum/protected/Lang/pl/messages.mo
gui/baculum/protected/Lang/pl/messages.po
gui/baculum/protected/Pages/ConfigurationWizard.php
gui/baculum/protected/Pages/Home.page
gui/baculum/protected/Pages/Home.php
gui/baculum/themes/Baculum-v1/key.png [new file with mode: 0644]
gui/baculum/themes/Baculum-v1/logo.png
gui/baculum/themes/Baculum-v1/logout.png [new file with mode: 0644]
gui/baculum/themes/Baculum-v1/style.css
gui/baculum/themes/Baculum-v1/user-del.png [new file with mode: 0644]
gui/baculum/themes/Baculum-v1/users.png [new file with mode: 0644]

index 7a711e98e0aea0425ea97c0329b252094e98a821..caa1bdd6f6cf56fe84ae385ec4566c9e12fa16e0 100644 (file)
@@ -167,7 +167,6 @@ class ConfigurationManager extends TModule
         */
        public function setUsersConfig($user, $password, $firstUsage = false, $oldUser = null) {
                $allUsers = $this->getAllUsers();
-               $usersFile = Prado::getPathOfNamespace(self::USERS_FILE, '.users');
                $password = $this->getCryptedPassword($password);
 
                if($firstUsage === true) {
@@ -194,16 +193,7 @@ class ConfigurationManager extends TModule
                        $allUsers[$user] = $password;
                }
 
-               $users = array();
-               foreach ($allUsers as $user => $pwd) {
-                       $users[] = "$user:$pwd";
-               }
-
-               $usersToFile = implode("\n", $users);
-               $old_umask = umask(0);
-               umask(0077);
-               $result = file_put_contents($usersFile, $usersToFile) !== false;
-               umask($old_umask);
+               $result = $this->saveUserConfig($allUsers);
                return $result;
        }
 
@@ -222,6 +212,30 @@ class ConfigurationManager extends TModule
                return $allUsers;
        }
 
+       public function saveUserConfig($allUsers) {
+               $users = array();
+               foreach ($allUsers as $user => $pwd) {
+                       $users[] = "$user:$pwd";
+               }
+               $usersFile = Prado::getPathOfNamespace(self::USERS_FILE, '.users');
+               $usersToFile = implode("\n", $users);
+               $old_umask = umask(0);
+               umask(0077);
+               $result = file_put_contents($usersFile, $usersToFile) !== false;
+               umask($old_umask);
+               return $result;
+       }
+
+       public function removeUser($username) {
+               $result = false;
+               $allUsers = $this->getAllUsers();
+               if (array_key_exists($username, $allUsers)) {
+                       unset($allUsers[$username]);
+                       $result = $this->saveUserConfig($allUsers);
+               }
+               return $result;
+       }
+
        /**
         * Checking if users configuration file exists.
         *
@@ -243,5 +257,17 @@ class ConfigurationManager extends TModule
                $result = file_put_contents($usersFile, '') !== false;
                return $result;
        }
+
+       public function switchToUser($http_protocol, $host, $port, $user, $password) {
+               $urlPrefix = $this->Application->getModule('friendly-url')->getUrlPrefix();
+               $location = sprintf("%s://%s:%s@%s:%d%s", $http_protocol, $user, $password, $host, $port, $urlPrefix);
+               header("Location: $location");
+       }
+
+       public function getRandomString() {
+               $characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+               $rand_string = str_shuffle($characters);
+               return $rand_string;
+       }
 }
 ?>
index 9500c0302601e1f9a179d3287886498fc83a5bf2..b5d3706b1bea3667259a52a53c497cacc57a0c0e 100644 (file)
@@ -225,3 +225,100 @@ var Dashboard = {
                }
        }
 }
+
+var Users = {
+       ids: {
+               create_user: {
+                       add_user: 'add_user',
+                       add_user_btn: 'add_user_btn',
+                       newuser: 'newuser',
+                       newpwd: 'newpwd'
+               },
+               change_pwd: {
+                       rel_chpwd: 'chpwd',
+                       rel_chpwd_btn: 'chpwd_btn'
+               }
+       },
+       init: function() {
+               this.setEvents();
+       },
+       setEvents: function() {
+               document.getElementById(this.ids.create_user.add_user_btn).addEventListener('click', function(e) {
+                       $(this.ids.create_user.add_user).show();
+                       $(this.ids.create_user.newuser).focus();
+               }.bind(this));
+               document.getElementById(this.ids.create_user.newuser).addEventListener('keypress', function(e) {
+                       var target = e.target || e.srcElement;
+                       if (e.keyCode == 13) {
+                               target.parentNode.getElementsByTagName('A')[0].click();
+                       }
+                       return false;
+               }.bind(this));
+               document.getElementById(this.ids.create_user.newpwd).addEventListener('keypress', function(e) {
+                       var target = e.target || e.srcElement;
+                       if (e.keyCode == 13) {
+                               $(target.nextElementSibling).click();
+                       }
+                       return false;
+               }.bind(this));
+       },
+       userValidator: function(user) {
+               user = user.replace(/\s/g, '');
+               var valid =  user != '';
+               return valid;
+       },
+       pwdValidator: function(pwd) {
+               var valid = pwd.length > 4;
+               return valid;
+       },
+       addUser: function() {
+               var valid = true;
+               var user = document.getElementById(this.ids.create_user.newuser).value;
+               var pwd = document.getElementById(this.ids.create_user.newpwd).value;
+               if (this.userValidator(user) === false) {
+                       alert(this.txt.enter_login);
+                       valid = false;
+               }
+               if (this.pwdValidator(pwd) === false) {
+                       alert(this.txt.invalid_pwd);
+                       valid = false;
+               }
+               if (valid === true) {
+                       $(this.ids.create_user.add_user).hide();
+                       this.action_callback('newuser', user, pwd);
+               }
+               return valid;
+       },
+       rmUser: function(user) {
+               this.action_callback('rmuser', user);
+       },
+       showChangePwd: function(el) {
+               $$('a[rel=\'' + this.ids.change_pwd.rel_chpwd_btn + '\']').invoke('show');
+               $(el).hide();
+               $$('span[rel=\'' + this.ids.change_pwd.rel_chpwd + '\']').invoke('hide');
+               $(el.nextElementSibling).show();
+               $(el.nextElementSibling).select('input')[0].focus();
+       },
+       changePwd: function(el, user) {
+               var valid = true;
+               var pwd = el.previousElementSibling.value;
+
+               if (this.pwdValidator(pwd) === false) {
+                       alert(this.txt.invalid_pwd);
+                       valid = false;
+               }
+               if (valid === true) {
+                       $(el.parentNode).hide();
+                       $(el.parentNode.previousElementSibling).show();
+                       this.action_callback('chpwd', user, pwd);
+               }
+       },
+       cancelAddUser: function(el) {
+               $(this.ids.create_user.add_user).hide();
+       },
+       cancelChangePwd: function(el) {
+               $(el.parentNode).hide();
+               $(el.parentNode.previousElementSibling).show();
+       }
+
+}
index 82881cb1dc90a2502c73bfef228eb2b3de601668..64dcd4468f5056cdb80d10504e5bec681a0c16e0 100644 (file)
@@ -1,7 +1,7 @@
 var PanelWindowClass = Class.create({
 
        currentWindowId: null,
-       windowIds: ['dashboard', 'container', 'graphs'],
+       windowIds: ['dashboard', 'container', 'graphs', 'users'],
        onShow: null,
 
        initialize: function() {
@@ -20,7 +20,7 @@ var PanelWindowClass = Class.create({
                                });
                        }
                }
-               for (var i = 0, j = 1; i < this.windowIds.length; i++, j++) {
+               for (var i = 0; i < this.windowIds.length; i++) {
                        hide_panel_by_id(this.windowIds[i]);
                }
        },
index bf230e4dea11bf56352fd4a9cb92eadef0095287..4ffd86e024aa42f7275e0df2f77ba6344ff76226 100644 (file)
Binary files a/gui/baculum/protected/Lang/en/messages.mo and b/gui/baculum/protected/Lang/en/messages.mo differ
index b4dcf0f6f406b6f25fa15cac60cf428ce54883dd..1179348a934262ee55383386fdffb69f0bf32c48 100644 (file)
@@ -1097,3 +1097,36 @@ msgstr "Baculum Settings"
 msgid "start time"
 msgstr "start time"
 
+msgid "Users"
+msgstr "Users"
+
+msgid "User name"
+msgstr "User name"
+
+msgid "Role"
+msgstr "Role"
+
+msgid "Remove user"
+msgstr "Remove user"
+
+msgid "Logout"
+msgstr "Logout"
+
+msgid "Change password"
+msgstr "Change password"
+
+msgid "Administrator"
+msgstr "Administrator"
+
+msgid "Normal user"
+msgstr "Normal user"
+
+msgid "Add new user"
+msgstr "Add new user"
+
+msgid "Username:"
+msgstr "Username:"
+
+msgid "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:"
+msgstr "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:"
+
index ba936762c4e5e1bd52f7b3c3fab154869bb01372..5b082983cc07bab398ac793328a01c696cbcf168 100644 (file)
Binary files a/gui/baculum/protected/Lang/pl/messages.mo and b/gui/baculum/protected/Lang/pl/messages.mo differ
index eb0f93f57cde5e970c91f22037d72aaa93a98cb0..ae77299db47519b936ec2f4b2b1ae1783f6bc2ae 100644 (file)
@@ -1098,3 +1098,36 @@ msgstr "Ustawienia Baculum"
 msgid "start time"
 msgstr "czas rozpoczęcia"
 
+msgid "Users"
+msgstr "Użytkownicy"
+
+msgid "User name"
+msgstr "Nazwa użytkownika"
+
+msgid "Role"
+msgstr "Rola"
+
+msgid "Remove user"
+msgstr "Usuń użytkownika"
+
+msgid "Logout"
+msgstr "Wyloguj"
+
+msgid "Change password"
+msgstr "Zmień hasło"
+
+msgid "Administrator"
+msgstr "Administrator"
+
+msgid "Normal user"
+msgstr "Użytkownik"
+
+msgid "Add new user"
+msgstr "Dodaj nowego użytkownika"
+
+msgid "Username:"
+msgstr "Nazwa użytkownika:"
+
+msgid "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:"
+msgstr "Uwaga! Dla każdego użytkownika (wyłączając administratora) powinien istnieć osobny plik konfiguracyjny Bconsole w postaci:"
+
index c84c22bf5c4f8780ee82353f84aee0b2e2ce19fe..8be23c600a651e76403ec77464e7448bcf148963 100644 (file)
@@ -114,9 +114,7 @@ class ConfigurationWizard extends BaculumPage
                                $this->getModule('configuration')->setUsersConfig($cfgData['baculum']['login'], $cfgData['baculum']['password'], $this->firstRun, $previousUser);
                                // Automatic login after finish wizard.
                                $http_protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http';
-                               $urlPrefix = $this->Application->getModule('friendly-url')->getUrlPrefix();
-                               $location = sprintf("%s://%s:%s@%s:%d%s", $http_protocol, $cfgData['baculum']['login'], $cfgData['baculum']['password'], $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $urlPrefix);
-                               header("Location: $location");
+                               $this->getModule('configuration')->switchToUser($http_protocol, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $cfgData['baculum']['login'], $cfgData['baculum']['password']);
                                exit();
                        } else { // standard version (user defined auth method)
                                $this->goToDefaultPage();
index 05f6c124c1b6e3cb250c2b5cce80aa3be1e5eafa..7fa7da3e2605ca046d6d8248e39b75dc6d0d25be 100644 (file)
@@ -1,19 +1,24 @@
 <%@ MasterClass="Application.Layouts.Main" Theme="Baculum-v1"%>
 <com:TContent ID="Main">
        <div id="top">
-               <img id="logo" src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logo.png" alt="Baculum" />
-               <div id="directors"><com:TLabel ForControl="Director" Text="<%[ Director: ]%>" />
-                       <com:TActiveDropDownList ID="Director" OnTextChanged="director" />
-               </div>
-               <div id="panel_switcher">
-                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/dashboard.png" alt="" onclick="$('<%=$this->Dashboard->ClientID%>').click()" />
-                       <com:TActiveLinkButton ID="Dashboard" Text="<%[ Dashboard ]%>" Attributes.onclick="PanelWindow.show('dashboard'); return false;" />
-                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/workspace.png" alt="" onclick="$('<%=$this->Workspace->ClientID%>').click()"/>
-                       <com:TActiveLinkButton ID="Workspace" Text="<%[ Workspace ]%>" Attributes.onclick="PanelWindow.show('container'); return false;" />
-                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/graphs.png" alt="" onclick="$('<%=$this->Graphs->ClientID%>').click()" />
-                       <com:TActiveLinkButton ID="Graphs" Text="<%[ Graphs ]%>" Attributes.onclick="PanelWindow.show('graphs'); return false;" />
-               </div>
+               <div id="topbar">
+                       <div id="directors"><com:TLabel ForControl="Director" Text="<%[ Director: ]%>" />
+                               <com:TActiveDropDownList ID="Director" OnTextChanged="director" />
+                       </div>
+                       <div id="panel_switcher">
+                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/dashboard.png" alt="" onclick="$('<%=$this->Dashboard->ClientID%>').click()" />
+                               <com:TActiveLinkButton ID="Dashboard" Text="<%[ Dashboard ]%>" Attributes.onclick="PanelWindow.show('dashboard'); return false;" />
+                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/workspace.png" alt="" onclick="$('<%=$this->Workspace->ClientID%>').click()"/>
+                               <com:TActiveLinkButton ID="Workspace" Text="<%[ Workspace ]%>" Attributes.onclick="PanelWindow.show('container'); return false;" />
+                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/graphs.png" alt="" onclick="$('<%=$this->Graphs->ClientID%>').click()" />
+                               <com:TActiveLinkButton ID="Graphs" Text="<%[ Graphs ]%>" Attributes.onclick="PanelWindow.show('graphs'); return false;" />
+                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/users.png" alt="" onclick="$('<%=$this->Users->ClientID%>').click()" <%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>/>
+                               <com:TActiveLinkButton ID="Users" Text="<%[ Users ]%>" Attributes.onclick="PanelWindow.show('users'); return false;" />
+                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logout.png" alt="" onclick="$('<%=$this->Logout->ClientID%>').click()" />
+                               <com:TActiveLinkButton ID="Logout" Text="<%[ Logout ]%>" OnClick="logout" ClientSide.OnComplete="document.location.href = document.location.protocol + '//' + document.location.host;" />
+                       </div>
                <com:Application.Portlets.TrayBar ID="TrayBar" />
+               </div>
        </div>
        <div id="dashboard">
                <div>
                <p class="right bold italic"><%[ Tip: for getting zoom, please mark area on graph. ]%></p>
                <p class="right bold italic"><%[ Tip 2: for back from zoom, please click somewhere on graph. ]%></p>
        </div>
+       <div id="users" style="display: none">
+               <div>
+                       <a href="javascript:void(0)" id="add_user_btn"><strong><%[ Add new user ]%></strong></a>
+                       <div id="add_user" style="display: none">
+                               <p><%[ Username: ]%><input id="newuser" type="text" /><%[ Password: ]%><input id="newpwd" type="password" />
+                               <a href="javascript:void(0)" onclick="Users.addUser()">
+                                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_ok.png" alt="<%[ Save ]%>" title="<%[ Save ]%>"/>
+                               </a>
+                               <a href="javascript:void(0)" onclick="Users.cancelAddUser()">
+                                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_err.png" alt="<%[ Close ]%>" title="<%[ Close ]%>" />
+                               </a></p>
+                       </div>
+                       <com:TActiveRepeater ID="UsersList">
+                               <prop:HeaderTemplate>
+                               <table id="users_list" class="window-section-detail-smallrow">
+                                       <tr>
+                                               <th><%[ User name ]%></th>
+                                               <th><%[ Role ]%></th>
+                                               <th><%[ Actions ]%></th>
+                                       </tr>
+                               </prop:HeaderTemplate>
+                               <prop:ItemTemplate>
+                                       <tr class="slide-window-element">
+                                               <td><%=$this->DataItem%></td>
+                                               <td><%=$this->User->getName() == $this->DataItem ? Prado::localize('Administrator') :  Prado::localize('Normal user')%></td>
+                                               <td>
+                                                       <a href="javascript:void(0)" <%=$this->User->getName() == $this->DataItem ? 'style="visibility: hidden"' : ''%> onclick="Users.rmUser('<%=$this->DataItem%>')"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/user-del.png"> <%[ Remove user ]%></a>
+                                                       <a href="javascript:void(0)" onclick="Users.showChangePwd(this)" rel="chpwd_btn">
+                                                               <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/key.png" alt="" />
+                                                               <%[ Change password ]%>
+                                                       </a>
+                                                       <span style="display: none;" rel="chpwd">
+                                                               <input type="password" onkeypress="event.keyCode == 13 ? $(this.nextElementSibling).click(): '';" />
+                                                               <a href="javascript:void(0)" onclick="Users.changePwd(this, '<%=$this->DataItem%>')">
+                                                                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_ok.png" alt="<%[ Save ]%>" title="<%[ Save ]%>"/>
+                                                               </a>
+                                                               <a href="javascript:void(0)" onclick="Users.cancelChangePwd(this)">
+                                                                       <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_err.png" alt="<%[ Close ]%>" title="<%[ Close ]%>" />
+                                                               </a>
+                                                       </span>
+                                               </td>
+                                       </tr>
+                               </prop:ItemTemplate>
+                               <prop:FooterTemplate>
+                                       </table>
+                               </prop:FooterTemplate>
+                       </com:TActiveRepeater>
+                       <p><em><%[ Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form: ]%> <strong><com:TLabel ID="BconsoleCustomPath" /></strong></em></p>
+                       <com:TCallback ID="UserAction" OnCallback="userAction" />
+                       <script type="text/javascript">
+                               var send_user_action = function(action, param, value) {
+                                       if (!value) {
+                                               value = '';
+                                       }
+                                       var user_action_callback = <%=$this->UserAction->ActiveControl->Javascript%>;
+                                       user_action_callback.ActiveControl.CallbackParameter = [action, param, value].join(';');
+                                       user_action_callback.dispatch();
+                               };
+                               Users.txt = {
+                                       enter_login: '<%[ Please enter login. ]%>',
+                                       invalid_pwd: '<%[ Password must be longer than 4 chars. ]%>'
+                               };
+                               Users.action_callback = send_user_action;
+                               Users.init();
+                       </script>
+               </div>
+       </div>
        <div id="console">
                <a id="clear_bvfs_cache" href="javascript: void(0)"><com:TActiveImageButton ID="ClearBvfsCache" OnCallback="clearBvfsCache" Attributes.onclick="return (confirm('<%=Prado::localize('This action will clear bvfs cache that was created during preparing restore files. There is not recommended use this action during restore job working. Are you sure?')%>'));" ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/trash_icon.png" AlternateText="<%[ clear bvfs cache ]%>" /><com:TLabel ForControl="ClearBvfsCache"><%[ clear bvfs cache ]%></com:TLabel></a>
                <a id="logging" href="javascript:void(0)"><com:TActiveCheckBox ID="Logging" OnCallback="setDebug" Attributes.onclick="return (this.checked === false || confirm('<%=Prado::localize('Debug files enable possibility to save most of actions executed on Baculum WebGUI. Debug functionality should be enabled if is happening shomething wrong with Baculum or something that looks like a bug. Logs can be useful for detecting a problems in Baculum working. After confirmation this message Baculum debug files will be continuously saving in /protected/Data/ directory. Are you sure?')%>'));" /><com:TLabel ForControl="Logging"><%[ Enable debug ]%></com:TLabel></a>
index ff829d5c990e05fe497a7de54e4766593621700a..a3c6da493857aca8996a9f0f7ad2a16a2c603f09 100644 (file)
@@ -57,11 +57,13 @@ class Home extends BaculumPage
 
                $appConfig = $this->getModule('configuration')->getApplicationConfig();
 
+               $this->Users->Visible = $this->User->getIsAdmin();
                $this->SettingsWizardBtn->Visible = $this->User->getIsAdmin();
                $this->PoolBtn->Visible = $this->User->getIsAdmin();
                $this->VolumeBtn->Visible = $this->User->getIsAdmin();
                $this->ClearBvfsCache->Visible = $this->User->getIsAdmin();
                $this->Logging->Visible = $this->User->getIsAdmin();
+               $this->BconsoleCustomPath->Text = $appConfig['bconsole']['cfg_custom_path'];
 
                if(!$this->IsPostBack && !$this->IsCallBack) {
                        $this->Logging->Checked = $this->getModule('logging')->isDebugOn();
@@ -81,6 +83,7 @@ class Home extends BaculumPage
                        $this->setJobsStates();
                        $this->setJobs();
                        $this->setClients();
+                       $this->setUsers();
                        $this->setWindowOpen();
                }
        }
@@ -157,6 +160,37 @@ class Home extends BaculumPage
                $this->Clients->dataBind();
        }
 
+       public function setUsers() {
+               if($this->User->getIsAdmin() === true) {
+                       $allUsers = $this->getModule('configuration')->getAllUsers();
+                       $users = array_keys($allUsers);
+                       sort($users);
+                       $this->UsersList->dataSource = $users;
+                       $this->UsersList->dataBind();
+               }
+       }
+
+       public function userAction($sender, $param) {
+               if($this->User->getIsAdmin() === true) {
+                       list($action, $param, $value) = explode(';', $param->CallbackParameter, 3);
+                       switch($action) {
+                               case 'newuser':
+                               case 'chpwd': {
+                                               $this->getmodule('configuration')->setusersconfig($param, $value);
+                                               $this->setUsers();
+                                               }
+                                               break;
+                               case 'rmuser': {
+                                               if ($param != $this->User->getName()) {
+                                                       $this->getModule('configuration')->removeUser($param);
+                                                       $this->setUsers();
+                                               }
+                                               break;
+                                       }
+                       }
+               }
+       }
+
        public function setWindowOpen() {
                if (isset($this->Request['open']) && in_array($this->Request['open'], $this->windowIds) && $this->Request['open'] != 'JobRun') {
                        $btn = $this->Request['open'] . 'Btn';
@@ -167,5 +201,12 @@ class Home extends BaculumPage
                        }
                }
        }
+
+       public function logout($sender, $param) {
+               $cfg = $this->getModule('configuration');
+               $http_protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http';
+               $fake_pwd = $cfg->getRandomString();
+               $cfg->switchToUser($http_protocol, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $this->User->getName(), $fake_pwd);
+       }
 }
 ?>
diff --git a/gui/baculum/themes/Baculum-v1/key.png b/gui/baculum/themes/Baculum-v1/key.png
new file mode 100644 (file)
index 0000000..9a261bb
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/key.png differ
index f50c1ac025e73051b6c7454f43d1510107ccb22b..83c53ceac5c3faad2126d2955b6b3fc99385572e 100644 (file)
Binary files a/gui/baculum/themes/Baculum-v1/logo.png and b/gui/baculum/themes/Baculum-v1/logo.png differ
diff --git a/gui/baculum/themes/Baculum-v1/logout.png b/gui/baculum/themes/Baculum-v1/logout.png
new file mode 100644 (file)
index 0000000..f7afdbf
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/logout.png differ
index ebab362029824929480844c171bbff49ab338769..57a0789bb74ad4a1fd8847a297ef47780b862f21 100644 (file)
@@ -99,6 +99,12 @@ a.big {
        float: left;
 }
 
+#topbar {
+       background: transparent url('logo.png') no-repeat 10px center;
+       width: 100%;
+       height: 51px;
+}
+
 #logo {
        margin-left: 20px;
 }
@@ -916,7 +922,7 @@ span.tab_active {
        background-color: rgb(163, 180, 197);
 }
 
-#graphs, #dashboard {
+#graphs, #dashboard, #users {
        min-width: 954px;
        max-width: 100%;
        padding: 10px;
@@ -926,6 +932,12 @@ span.tab_active {
        border-right: 1px solid black;
 }
 
+#users input {
+       height: 9px;
+       margin: 0 4px;
+       font-size: 10px;
+}
+
 #graphs span {
        margin: 0 3px;
 }
@@ -999,8 +1011,42 @@ span.tab_active {
 }
 
 #jobs_to_view {
-    width: 240px;
-    margin: 0 2px 0 5px;
+       width: 240px;
+       margin: 0 2px 0 5px;
+}
+
+#users_list {
+       width: 720px;
+       font-size: 13px;
+}
+
+#users_list td {
+       font-style: normal;
+       padding: 3px 5px;
+}
+
+#users_list td:nth-of-type(1) {
+       font-weight: bold;
+}
+
+#users_list tr {
+       cursor: initial;
+}
+
+#users_list td:nth-of-type(1) {
+       width: 200px;
+}
+
+i#users_list td:nth-of-type(1) {
+       width: 120px;
+}
+
+#users_list td:nth-of-type(3) {
+       width: 400px;
+}
+
+#users_list img {
+       float: none;
 }
 
 /* Overwrite date picker classes */
diff --git a/gui/baculum/themes/Baculum-v1/user-del.png b/gui/baculum/themes/Baculum-v1/user-del.png
new file mode 100644 (file)
index 0000000..9725fd7
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/user-del.png differ
diff --git a/gui/baculum/themes/Baculum-v1/users.png b/gui/baculum/themes/Baculum-v1/users.png
new file mode 100644 (file)
index 0000000..084629b
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/users.png differ