diff --git a/Config/Schema/schema.xml b/Config/Schema/schema.xml
index a9702f3..d78fd3c 100644
--- a/Config/Schema/schema.xml
+++ b/Config/Schema/schema.xml
@@ -33,6 +33,10 @@
REFERENCES cm_co_dashboard_widgets(id)
+
+
+
+
diff --git a/Controller/CoGrouperLitesController.php b/Controller/CoGrouperLitesController.php
index 2e082c9..452ae9c 100644
--- a/Controller/CoGrouperLitesController.php
+++ b/Controller/CoGrouperLitesController.php
@@ -4,14 +4,26 @@
class CoGrouperLitesController extends SDWController {
+ public $helpers = array('Html', 'Form', 'Flash');
+ public $components = array('Flash');
+
// Class name, used by Cake
public $name = "CoGrouperLites";
+ public $uses = array(
+ "GrouperLite.CoGrouperLite"
+ );
+
public function display($id)
{
- echo 'hi there';
+ //$cfg = $this->CoGrouperLite->getConfig();
+
+ $this->set('title', "Grouper Configuration Settings");
+ // Pass the config so we know which div to overwrite
+ $this->set('vv_config', $cfg);
}
+
/**
* Authorization for this Controller, called by Auth component
* - precondition: Session.Auth holds data used for authz decisions
@@ -20,6 +32,29 @@ public function display($id)
* @since COmanage Registry v3.2.0
* @return Array Permissions
*/
+ /*
+ function isAuthorized() {
+ $roles = $this->Role->calculateCMRoles();
+
+ // Determine what operations this user can perform
+
+ // Construct the permission set for this user, which will also be passed to the view.
+ // Ask the parent to calculate the display permission, based on the configuration.
+ // Note that the display permission is set at the Dashboard, not Dashboard Widget level.
+ $p = $this->calculateParentPermissions($roles);
+
+ // Delete an existing CO Services Widget?
+ $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);
+
+ // Edit an existing CO Services Widget?
+ $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);
+
+ // View an existing CO Services Widget?
+ $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);
+
+ $this->set('permissions', $p);
+ return($p[$this->action]);
+ }*/
function isAuthorized()
{
diff --git a/Model/CoGrouperLite.php b/Model/CoGrouperLite.php
index ac62fbd..f276be6 100644
--- a/Model/CoGrouperLite.php
+++ b/Model/CoGrouperLite.php
@@ -11,4 +11,46 @@ class CoGrouperLite extends CoDashboardWidgetBackend {
"CoDashboardWidget"
);
+ // Add behaviors
+ public $actsAs = array('Containable');
+
+ public $hasMany = array(
+ );
+
+ public $duplicatableModels = array(
+ "CoGrouperLite" => array(
+ "parent" => "CoDashboardWidget",
+ "fk" => "co_dashboard_widget_id"
+ )
+ );
+
+ // Validation rules for table elements
+ public $validate = array(
+ 'co_dashboard_widget_id' => array(
+ 'rule' => 'numeric',
+ 'required' => true,
+ 'allowEmpty' => false
+ ),
+ 'connUrl' => array(
+ 'rule' => 'alphaNumeric',
+ 'required' => true,
+ 'allowEmpty' => false
+ ),
+ 'connVer' => array(
+ 'rule' => 'alphaNumeric',
+ 'required' => true,
+ 'allowEmpty' => false
+ ),
+ 'connUser' => array(
+ 'rule' => 'alphaNumeric',
+ 'required' => true,
+ 'allowEmpty' => false
+ ),
+ 'connPass' => array(
+ 'rule' => 'alphaNumeric',
+ 'required' => true,
+ 'allowEmpty' => false
+ ),
+ );
+
}
\ No newline at end of file
diff --git a/Model/GrouperLite.php b/Model/GrouperLite.php
index 3123303..ef785ea 100644
--- a/Model/GrouperLite.php
+++ b/Model/GrouperLite.php
@@ -8,6 +8,17 @@ class GrouperLite extends AppModel {
// Required by COmanage Plugins
public $cmPluginType = "dashboardwidget";
+ // Association rules from this model to other models
+ public $belongsTo = array(
+ );
+
+ public $hasMany = array(
+ );
+
+ // Validation rules for table elements
+ public $validate = array(
+ );
+
public function cmPluginMenus() {
return array(
"cogroups" => array(
diff --git a/View/CoGrouperLite/display.ctp b/View/CoGrouperLite/display.ctp
deleted file mode 100644
index 2e9664d..0000000
--- a/View/CoGrouperLite/display.ctp
+++ /dev/null
@@ -1 +0,0 @@
-Hi I am the dashboard widget
\ No newline at end of file
diff --git a/View/CoGrouperLites/display.ctp b/View/CoGrouperLites/display.ctp
new file mode 100644
index 0000000..508ab77
--- /dev/null
+++ b/View/CoGrouperLites/display.ctp
@@ -0,0 +1 @@
+yoy are home
\ No newline at end of file
diff --git a/View/CoGrouperLites/edit.ctp b/View/CoGrouperLites/edit.ctp
new file mode 100644
index 0000000..e62dcaa
--- /dev/null
+++ b/View/CoGrouperLites/edit.ctp
@@ -0,0 +1,14 @@
+
+Form->create('CoGrouperLites');
+echo $this->Form->input('connUrl');
+echo $this->Form->input('connVer');
+echo $this->Form->input('connUser');
+echo $this->Form->input('connPass');
+echo $this->Form->input('id', array('type' => 'hidden'));
+echo $this->Form->end('Save Post');
+?>
\ No newline at end of file