diff --git a/GrouperWidget/Config/Schema/empty b/GrouperWidget/Config/Schema/empty new file mode 100644 index 0000000..e69de29 diff --git a/GrouperWidget/Console/Command/Task/empty b/GrouperWidget/Console/Command/Task/empty new file mode 100644 index 0000000..e69de29 diff --git a/GrouperWidget/Console/Templates/empty b/GrouperWidget/Console/Templates/empty new file mode 100644 index 0000000..e69de29 diff --git a/GrouperWidget/Controller/CoGrouperWidgetController.php b/GrouperWidget/Controller/CoGrouperWidgetController.php new file mode 100644 index 0000000..5759dc2 --- /dev/null +++ b/GrouperWidget/Controller/CoGrouperWidgetController.php @@ -0,0 +1,71 @@ +CoServicesWidget->getConfig(); + + // For now simply provide the services portal URL for the current CO. All necessary + // logic is already attended to there. See: Views/CoServices/portal.ctp + $services_url = Router::url([ + 'plugin' => null, + 'controller' => 'co_services', + 'action' => 'portal', + 'co' => $this->cur_co['Co']['id'] + ]); + $this->set('vv_services_url', $services_url); + + // 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 + * - postcondition: $permissions set with calculated permissions + * + * @since COmanage Registry v3.2.0 + * @return Array Permissions + */ + + function isAuthorized() { + //TODO - Need to work on this + + $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]); + } + +} diff --git a/GrouperWidget/Controller/Component/empty b/GrouperWidget/Controller/Component/empty new file mode 100644 index 0000000..e69de29 diff --git a/GrouperWidget/Controller/GrouperWidgetAppController.php b/GrouperWidget/Controller/GrouperWidgetAppController.php new file mode 100644 index 0000000..8255498 --- /dev/null +++ b/GrouperWidget/Controller/GrouperWidgetAppController.php @@ -0,0 +1,7 @@ +