diff --git a/.gitmodules b/.gitmodules index e049bb7..eb72036 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "includes/kohana"] path = includes/kohana - url = /afs/local/git/lnkohana + url = git@dev.leenooks.net:deon/lnkohana.git [submodule "modules/lnapp"] path = modules/lnapp - url = /afs/local/git/lnapp + url = git@dev.leenooks.net:deon/lnapp.git diff --git a/application/classes/Controller/User/Admin.php b/application/classes/Controller/User/Admin.php index 82c08df..2160fb2 100644 --- a/application/classes/Controller/User/Admin.php +++ b/application/classes/Controller/User/Admin.php @@ -34,7 +34,7 @@ class Controller_User_Admin extends Controller_Admin { if ($this->request->post()) { // Find a free name. - for ($i=1;$i<$n->count();$i++) + for ($i=1;$i<=$n->count();$i++) if (! Object::in_array('ADMIN_NAME',$this->admin_name($i),$n->as_array())) break; diff --git a/application/classes/Controller/User/Node.php b/application/classes/Controller/User/Node.php index 71f7800..d67d445 100644 --- a/application/classes/Controller/User/Node.php +++ b/application/classes/Controller/User/Node.php @@ -34,7 +34,7 @@ class Controller_User_Node extends Controller_Node { if ($this->request->post()) { // Find a free name. - for ($i=1;$i<$n->count();$i++) + for ($i=1;$i<=$n->count();$i++) if (! Object::in_array('NODE_NAME',$this->node_name($i),$n->as_array())) break; diff --git a/application/config/tsm.php b/application/config/tsm.php index 7d7ceeb..82cc75e 100644 --- a/application/config/tsm.php +++ b/application/config/tsm.php @@ -2,6 +2,11 @@ return array ( + 'admin_register' => array( + 'max_nodes'=>2, + 'max_admin'=>1, + 'prefix'=>'I', + ), 'admin_create' => array( 'FORCEPWRESET'=>'YES', 'PASSEXP'=>90, diff --git a/application/messages/models/ssl.php b/application/messages/models/ssl.php index 8b693aa..8551193 100644 --- a/application/messages/models/ssl.php +++ b/application/messages/models/ssl.php @@ -12,7 +12,7 @@ return array( 'csr'=>array( - 'isValidDN'=>'This Certificate Sign Request does not contact your valid DN', + 'isValidDN'=>'This Certificate Sign Request does not contain your valid DN', ), ); ?> diff --git a/application/views/pages/welcome.php b/application/views/pages/welcome.php index 5052674..7eb63f0 100644 --- a/application/views/pages/welcome.php +++ b/application/views/pages/welcome.php @@ -18,8 +18,8 @@

Node Access

This TSM server is available for you to connect with any TSM client and backup data. You do not need to worry about the setup of a TSM server (we've done already)!

When connecting to this server, you can try out a TSM client and see how you can protect your application or data, and how you can recover it.

-

Request as many NODE IDs as you need, it's easy, first just register on the site, and then drop an email to dgeorge AT au DOT ibm DOT com, and tell us what you need. We'll reply with the details.

-

Login »

+

Request as many NODE IDs as you need, it's easy, first just register on the site, reset your password and then create a TSM node. If you need help drop an email to dgeorge AT au DOT ibm DOT com, and tell us what you need.

+

Register »

diff --git a/application/views/ssl/user/view.php b/application/views/ssl/user/view.php index 337705f..39f11b9 100644 --- a/application/views/ssl/user/view.php +++ b/application/views/ssl/user/view.php @@ -82,6 +82,7 @@ ?> +cert) : ?>
TSM Configuration @@ -108,3 +109,10 @@
+ +
+ Pending Signing +

Your certificate is waiting to be signed by an administrator.

+

Please contact dgeorge@au.ibm.com requesting SSL id id; ?> to be signed.

+
+ diff --git a/application/views/welcome/user/shortcuts.php b/application/views/welcome/user/shortcuts.php index 49e770e..ee918e6 100644 --- a/application/views/welcome/user/shortcuts.php +++ b/application/views/welcome/user/shortcuts.php @@ -1,5 +1,5 @@
- Create Node - Create SSL Create Admin + Create SSL + Create Node
diff --git a/modules/lnapp b/modules/lnapp index db7f5f8..3ebf3c4 160000 --- a/modules/lnapp +++ b/modules/lnapp @@ -1 +1 @@ -Subproject commit db7f5f8d55fb2d467d7e70df5f7bd15b7a21efbc +Subproject commit 3ebf3c44e2c3db2dd4b5829b89c9abcac01a964e diff --git a/modules/ssl/classes/Controller/User/Ssl.php b/modules/ssl/classes/Controller/User/Ssl.php index 19b5732..29a00a1 100644 --- a/modules/ssl/classes/Controller/User/Ssl.php +++ b/modules/ssl/classes/Controller/User/Ssl.php @@ -20,7 +20,7 @@ class Controller_User_Ssl extends Controller_Ssl { public function action_add() { if ($this->request->post() OR $_FILES) { - if ($_FILES AND $this->request->post('csr')) + if ((isset($_FILES['csr_file']['tmp_name']) AND $_FILES['csr_file']['tmp_name']) AND $this->request->post('csr')) SystemMessage::add(array( 'title'=>_('Validation failed'), 'type'=>'info', diff --git a/modules/tsm/classes/lnApp/Database/Query/Builder/Insert.php b/modules/tsm/classes/lnApp/Database/Query/Builder/Insert.php index 4951b6f..ca593a3 100644 --- a/modules/tsm/classes/lnApp/Database/Query/Builder/Insert.php +++ b/modules/tsm/classes/lnApp/Database/Query/Builder/Insert.php @@ -18,11 +18,14 @@ abstract class lnApp_Database_Query_Builder_Insert extends Kohana_Database_Query ); public function compile($db = NULL) { - if ( ! is_object($db)) { + if (! is_object($db)) { // Get the database instance $db = Database::instance($db); } + if (! $db instanceof Database_Tsm_dsmadmc) + return parent::compile($db); + switch ($this->_table) { case 'ADMINS': $query = sprintf('REGISTER ADMIN %s %s %s',$this->pop_value('ADMIN_NAME'),$this->pop_value('PASSWORD'),$this->insert_values());