From e6d49d055d171a9b97a2db8effd327a90eb107cd Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Wed, 30 Dec 2015 00:10:51 +0100 Subject: [PATCH] baculum: Implement users management from web interface --- .../protected/Class/ConfigurationManager.php | 48 +++++++-- gui/baculum/protected/JavaScript/misc.js | 97 ++++++++++++++++++ .../protected/JavaScript/panel-window.js | 4 +- gui/baculum/protected/Lang/en/messages.mo | Bin 27407 -> 28071 bytes gui/baculum/protected/Lang/en/messages.po | 33 ++++++ gui/baculum/protected/Lang/pl/messages.mo | Bin 29645 -> 30368 bytes gui/baculum/protected/Lang/pl/messages.po | 33 ++++++ .../protected/Pages/ConfigurationWizard.php | 4 +- gui/baculum/protected/Pages/Home.page | 96 ++++++++++++++--- gui/baculum/protected/Pages/Home.php | 41 ++++++++ gui/baculum/themes/Baculum-v1/key.png | Bin 0 -> 1436 bytes gui/baculum/themes/Baculum-v1/logo.png | Bin 2421 -> 3169 bytes gui/baculum/themes/Baculum-v1/logout.png | Bin 0 -> 1076 bytes gui/baculum/themes/Baculum-v1/style.css | 52 +++++++++- gui/baculum/themes/Baculum-v1/user-del.png | Bin 0 -> 1300 bytes gui/baculum/themes/Baculum-v1/users.png | Bin 0 -> 1523 bytes 16 files changed, 377 insertions(+), 31 deletions(-) create mode 100644 gui/baculum/themes/Baculum-v1/key.png create mode 100644 gui/baculum/themes/Baculum-v1/logout.png create mode 100644 gui/baculum/themes/Baculum-v1/user-del.png create mode 100644 gui/baculum/themes/Baculum-v1/users.png diff --git a/gui/baculum/protected/Class/ConfigurationManager.php b/gui/baculum/protected/Class/ConfigurationManager.php index 7a711e98e0..caa1bdd6f6 100644 --- a/gui/baculum/protected/Class/ConfigurationManager.php +++ b/gui/baculum/protected/Class/ConfigurationManager.php @@ -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; + } } ?> diff --git a/gui/baculum/protected/JavaScript/misc.js b/gui/baculum/protected/JavaScript/misc.js index 9500c03026..b5d3706b1b 100644 --- a/gui/baculum/protected/JavaScript/misc.js +++ b/gui/baculum/protected/JavaScript/misc.js @@ -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(); + } + +} diff --git a/gui/baculum/protected/JavaScript/panel-window.js b/gui/baculum/protected/JavaScript/panel-window.js index 82881cb1dc..64dcd4468f 100644 --- a/gui/baculum/protected/JavaScript/panel-window.js +++ b/gui/baculum/protected/JavaScript/panel-window.js @@ -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]); } }, diff --git a/gui/baculum/protected/Lang/en/messages.mo b/gui/baculum/protected/Lang/en/messages.mo index bf230e4dea11bf56352fd4a9cb92eadef0095287..4ffd86e024aa42f7275e0df2f77ba6344ff76226 100644 GIT binary patch literal 28071 zcmeI437lL-oyQ*}fiNUM67KUw37J5qlL;9JjU?pGK#n0Z355Gi_nVm}-Tj*Px@R&` z#MMQjvVg1L0f^^ujAF^@u}ml@^}V!@w`Lfm-h6$=XihJ0dn=cRY!Q^c*#846{d?hl@F930{2^31 zeh(+WJ*Qjy6nHrHBVY?$2vyEbI0bHiyTN{_bjolVywvd;=Y9*^3-|ls{_q=6^?w!~ z3;zK3hR43jaw+t&cf*5W6&?hyfCTkE3YG7JQ04k6RQzv4rT+|6J;uMtwhuJPj(pKF4j&|0c(~pwjsgRQ(=-YKI@diSQYy_`h=g2OeqV zGZQNOiH@f@Zi1@M095=0Ub+kY2CBZ}kFx%ILe+DBsBmpi`5p)7!js`)@It6|y#lJ< z*FlB9$?-O*^4|?r|Ifke60!39v|Tm+T=8n^|X4ex@F!e#L7vuuC-I@C~l0V@9FqiuQih5Yj} z&b|qL1$zS5z~#qy-dg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k{l>~dcXB(Gk(A#?eN5_zq5dRx z#0LT`{CyWU5(|lS#GgbbB9i!)C?FP{5|&YW9|o!m7P1IHlei%v1YUDMmOJ?>1VeLCfAo!2^~P{_gt zL>(fLSW28BdJ=yS7l~!WD};_n?n%S{25R=lIB4$bG1x{OxZ^+gG?7PJ1zw9y3H5LK zQOH%{Z$}%-g@3D$<(dTIdgAJFkiv1|bK>7u8!?V+ZpL;v0QOW@x8xS@;qPFfs{;tRO3&5{@+qpMpbReO7L&W+UWC-XmcsFYEOq#{JyS*Fk>tA(eVeP6ni|YAL6om%)FZKfwN)u?JVthPUF ce5}vkV!}$F|J|D&s!{dg)VlulQ!j`94+)ZGeEgetModule('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(); diff --git a/gui/baculum/protected/Pages/Home.page b/gui/baculum/protected/Pages/Home.page index 05f6c124c1..7fa7da3e26 100644 --- a/gui/baculum/protected/Pages/Home.page +++ b/gui/baculum/protected/Pages/Home.page @@ -1,19 +1,24 @@ <%@ MasterClass="Application.Layouts.Main" Theme="Baculum-v1"%>
- -
- -
-
- - - - - - -
+
+
+ +
+
+ + + + + + + User->getIsAdmin() === false ? ' style="display: none;"' : ''%>/> + + + +
+
@@ -282,6 +287,73 @@

<%[ Tip: for getting zoom, please mark area on graph. ]%>

<%[ Tip 2: for back from zoom, please click somewhere on graph. ]%>

+
<%[ clear bvfs cache ]%> <%[ Enable debug ]%> diff --git a/gui/baculum/protected/Pages/Home.php b/gui/baculum/protected/Pages/Home.php index ff829d5c99..a3c6da4938 100644 --- a/gui/baculum/protected/Pages/Home.php +++ b/gui/baculum/protected/Pages/Home.php @@ -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 index 0000000000000000000000000000000000000000..9a261bb6ba36118dc53db88eeeeeff9229eceb64 GIT binary patch literal 1436 zcmV;N1!MY&P)`4QsOcQ#1rg<3>6Nw4I>?)1fe(&P?xp-+PWfrVz~9 zBA(p$$D8-$Jm)#*Irk8*!ghU@NjhP*E@at%w`_Y^)V0Xy0KTu!Y2SNI2eOY(9LzrZ z)F!;~`4G0Oy8(2ipu7Kd0?$3L1bzR`ZkSW=_D7@6LMDa!h(f|45D_vH0ZhOMe6KQb zp}hO)bql)y;Po#~%?_~ZlQgzHv=qBP8+tUJNPG}>Y?R6X3qeF6AP`VH3UI=Lm@7DU zX5!1gty{1b({I0O-5>sljz@3B&IA8j7ER0>aNGzcD+E#kNX>_tMeCp<0Na)oQz24z zh!6=gD#i01Pv6(nGb@9?L_zD{&!m%clQ)&h3=slqAG8iIUMRjdS+4FQqQHsRYf^LT zUx-8^WGMl0H4k06&6*8h^`0N@w4+` zODrq&I5R;>=sJSjr)KSN$hkcba(tf=FoRjZ3>XtY8)GhaeP`<*{c6QKt2KiIfq_Dp zf-N&Lc%tXa5F5j(K^;n;6s{;TGvpnEN!&?9mV*&yZw3t85 z2%tSuo(aOXXP{IFmn$L=;F?q{?nY?SNT&2x07xYrr(s^5T`UH~LLd^9edf?i0OM-0 z+}wQ2-C^5pA*BEjhzNLEMCG!fhK6Wl$&GU&jSJ(EWXiS9j`?H)0K&B-rzX=gGRS`Y zlAK@NI#3r+8fa~ix|j1V;8H_KAOb)HJPjbsFs2Hv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}m+vp7 zyo2UdtJU*KSyS3^@9j<U@Aq$}4>)<$H;KtyC(V zqm^-z#3+3si8?F0mSw$_eKt%S*9Zri#j805fZr4U`9rOe z)8i@qd5D@gpCWnBxasOG+Js6kmdoYyeD1D3P4st=^ly-K31HAP&E@JCzaPLsxe5Fq*WGu0 znM|gQvHx7YlS7M>QF5wTyqZ%8A+8N`u^P1;8RU;^lS)V_Z+7pf=p#-c#0Nii0T$EB28ve|6=OzoZtmSwGq(C(Q78rP*wr_(7K zx9aT%@G?1Gz9b4xHJev+0`>UxMfViQFX)Y0F5rG@l*Kr!Q4a^2$*Va7_2~f&wMxz} zo^pfc7-ui);XpHaHJ2;Op8<>l7}1~3G)pcho{~~-jcIw-?^2;S&}?4)UqgGFwleOK n7%^hRh!G=3j2JOuoCWwdw-4k^c&8h&00000NkvXXu0mjfX2qgF diff --git a/gui/baculum/themes/Baculum-v1/logout.png b/gui/baculum/themes/Baculum-v1/logout.png new file mode 100644 index 0000000000000000000000000000000000000000..f7afdbf23e0741700a714282e22d0812a5222273 GIT binary patch literal 1076 zcmV-41k3x0P)Zq%U0g$oj05m!cn(S^Ek zXG|oo8A4!y)=A7DiC|se#{z_^fIyvLhzuVyL+RI<`yNyn(k@-hob;vVoqO*6osWC( zBYb9|{}};v1yj(WCf4`i**$k?wA$GZ#91h}LyBHTQ0;f-d+S-Uco@Id1$d8AH-1etW z;{y(ql{pO~Ba10pEWp*PYU=90L(JQ=2e@znsH+3g(!jTGgC9Or{RIGBqoc0UxPToy zq@qKIWW&%9NC;oM#<1Cd&Q8LuTZ}7LNB}r;{ybo{LUZX7AsFOfO${PGAHihe?(uQ= zL60X+lLg>_-L3+#eLLaiO@_~h@VRrufdD7e*AwOBa6nm5_#_H@;;~~Klw~a3y{iH| zA3nIto;`~Lu-T--k`h_}_ANA(m6UMyEQcOEK=9r@wI8~M2GZo_@?U4pAUrSt+Omb# zHa2qT1pE7;*|Z6k@o_9Xe~w@G?uAD5tj}a}ebd($8_+5MUlk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~cqhDZsc1rZG?oP)%Rh zvt#?h@rgLZxCF9=T;%D?1Ft{fHCHDlKd>q_l{Kd2aZqA=)LL>UW--GD=%}6{lt#wlI;JoDYmW1gGVxYGd6)DaT065cq zWo;Ho#LF6Pj#kCQ$7JQlyg?k7@Y+G zQYr``A(cWkOGWx)DO!ppl0wIrr0XhR2yiY3s5aHTxjrl4X$pML@5Q^ z5zx7I_x{#2bZ!3}>fLwHRC4fJO%QKK>#{5U$ao*Snr56EOSOjNHRcIF+{ZL_+%R~) zRH_hHNRR6XlMn(aC0tj+c3jxDfaAIlu7v9f*set9zHgD}>O#uY@#)y)_C*`EzPjbW zSH1U{#=P;AqR;E=9Vz$HRok?g(bfFqJ0d8A)TL645aMc-mN{n` z&e?U5%U(OR>ctnXXEMdZtH0cIX#D~K0B^-&&rb=5=JcFByYf%V$^@SKReMVS0000< KMNUMnLSTYiiBe1e literal 0 HcmV?d00001 diff --git a/gui/baculum/themes/Baculum-v1/users.png b/gui/baculum/themes/Baculum-v1/users.png new file mode 100644 index 0000000000000000000000000000000000000000..084629b8625dafd5150bd845e686272314017877 GIT binary patch literal 1523 zcmVW0OP+Q@K z|D1al;eQ^O=w(KlJBKkjD;_uQJn}vEWu<#2$P%nYz(P)gzUnkgUiHB1YfX2%T#T_i z(=;DG?DpOJS3qt~)=q}-0qMwy7>=9#O9}Wode(+QxcH7n!~{IbBwSB(c6v4`cK_Y3 zhr5OaR}VPOAk+QWEs`_P~R#E^w!%frOG3N2`TEUjRIwbZ|PI5DEr? zlhW+cInnBx?=xGkxAi0hOqo1sY(wLzPGQ6CTfd{OJK%b23(v~V#@#!%fv)R72Ju)d zh9BpK1`W96->i`SUe8#SnQeKZm$=pz+{yNf@G7|>x~?$sK}_PsR;~Q z3%&u7xj^ZrZo;jrXI`DE5;rWRE2%#Oa*{5Ob6vC)==a+&Bx+)7y&`)s6ekG`D_q z_2g$yo&$_u@!qnGsV`Sf&d*6*UXlt%C;*ScCd?_x1BJ(hFhuAQ5UL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