Misc fixes

This commit is contained in:
Deon George 2015-09-29 08:27:44 -05:00
parent 43bd45d43e
commit 301d5ce517
11 changed files with 28 additions and 12 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "includes/kohana"] [submodule "includes/kohana"]
path = includes/kohana path = includes/kohana
url = /afs/local/git/lnkohana url = git@dev.leenooks.net:deon/lnkohana.git
[submodule "modules/lnapp"] [submodule "modules/lnapp"]
path = modules/lnapp path = modules/lnapp
url = /afs/local/git/lnapp url = git@dev.leenooks.net:deon/lnapp.git

View File

@ -34,7 +34,7 @@ class Controller_User_Admin extends Controller_Admin {
if ($this->request->post()) { if ($this->request->post()) {
// Find a free name. // 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())) if (! Object::in_array('ADMIN_NAME',$this->admin_name($i),$n->as_array()))
break; break;

View File

@ -34,7 +34,7 @@ class Controller_User_Node extends Controller_Node {
if ($this->request->post()) { if ($this->request->post()) {
// Find a free name. // 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())) if (! Object::in_array('NODE_NAME',$this->node_name($i),$n->as_array()))
break; break;

View File

@ -2,6 +2,11 @@
return array return array
( (
'admin_register' => array(
'max_nodes'=>2,
'max_admin'=>1,
'prefix'=>'I',
),
'admin_create' => array( 'admin_create' => array(
'FORCEPWRESET'=>'YES', 'FORCEPWRESET'=>'YES',
'PASSEXP'=>90, 'PASSEXP'=>90,

View File

@ -12,7 +12,7 @@
return array( return array(
'csr'=>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',
), ),
); );
?> ?>

View File

@ -18,8 +18,8 @@
<h3><i class="fa fa-recycle"></i>Node Access</h3> <h3><i class="fa fa-recycle"></i>Node Access</h3>
<p>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)!</p> <p>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)!</p>
<p>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.</p> <p>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.</p>
<p>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.</p> <p>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.</p>
<p><a href="<?php echo URL::site('login'); ?>" class="">Login »</a></p> <p><a href="<?php echo URL::site('login/register'); ?>" class="">Register »</a></p>
</div> <!-- /service --> </div> <!-- /service -->
</div> </div>

View File

@ -82,6 +82,7 @@
?> ?>
</fieldset> </fieldset>
<?php if ($o->cert) : ?>
<fieldset class="col-md-12"> <fieldset class="col-md-12">
<legend>TSM Configuration</legend> <legend>TSM Configuration</legend>
@ -108,3 +109,10 @@
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<?php else : ?>
<fieldset class="col-md-12">
<legend>Pending Signing</legend>
<p>Your certificate is waiting to be signed by an administrator.</p>
<p>Please contact dgeorge@au.ibm.com requesting SSL id <strong><?php echo $o->id; ?></strong> to be signed.</p>
</fieldset>
<?php endif ?>

View File

@ -1,5 +1,5 @@
<div class="shortcuts"> <div class="shortcuts">
<a href="<?php echo URL::link('user','node/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-desktop"></i><span class="shortcut-label">Create Node</span></a>
<a href="<?php echo URL::link('user','ssl/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-certificate"></i><span class="shortcut-label">Create SSL</span></a>
<a href="<?php echo URL::link('user','admin/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-graduation-cap"></i><span class="shortcut-label">Create Admin</span></a> <a href="<?php echo URL::link('user','admin/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-graduation-cap"></i><span class="shortcut-label">Create Admin</span></a>
<a href="<?php echo URL::link('user','ssl/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-certificate"></i><span class="shortcut-label">Create SSL</span></a>
<a href="<?php echo URL::link('user','node/add',TRUE); ?>" class="shortcut"><i class="shortcut-icon fa fa-desktop"></i><span class="shortcut-label">Create Node</span></a>
</div> </div>

@ -1 +1 @@
Subproject commit db7f5f8d55fb2d467d7e70df5f7bd15b7a21efbc Subproject commit 3ebf3c44e2c3db2dd4b5829b89c9abcac01a964e

View File

@ -20,7 +20,7 @@ class Controller_User_Ssl extends Controller_Ssl {
public function action_add() { public function action_add() {
if ($this->request->post() OR $_FILES) { 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( SystemMessage::add(array(
'title'=>_('Validation failed'), 'title'=>_('Validation failed'),
'type'=>'info', 'type'=>'info',

View File

@ -18,11 +18,14 @@ abstract class lnApp_Database_Query_Builder_Insert extends Kohana_Database_Query
); );
public function compile($db = NULL) { public function compile($db = NULL) {
if ( ! is_object($db)) { if (! is_object($db)) {
// Get the database instance // Get the database instance
$db = Database::instance($db); $db = Database::instance($db);
} }
if (! $db instanceof Database_Tsm_dsmadmc)
return parent::compile($db);
switch ($this->_table) { switch ($this->_table) {
case 'ADMINS': case 'ADMINS':
$query = sprintf('REGISTER ADMIN %s %s %s',$this->pop_value('ADMIN_NAME'),$this->pop_value('PASSWORD'),$this->insert_values()); $query = sprintf('REGISTER ADMIN %s %s %s',$this->pop_value('ADMIN_NAME'),$this->pop_value('PASSWORD'),$this->insert_values());