Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed Group and Permissions. Start refactoring of users,groups an p…

…ermissions functionalities
  • Loading branch information...
commit 44ef0a8fca83a672bd7487a3be936b4233dd59fc 1 parent 48e0366
Filippo authored
Showing with 91 additions and 1,610 deletions.
  1. +0 −3  apps/fe/modules/sfGuardGroup/config/security.yml
  2. +0 −4 apps/fe/modules/sfGuardGroup/config/view.yml
  3. +0 −27 apps/fe/modules/sfGuardGroup/templates/editSuccess.php
  4. +0 −48 apps/fe/modules/sfGuardGroup/templates/indexSuccess.php
  5. +0 −26 apps/fe/modules/sfGuardGroup/templates/newSuccess.php
  6. +0 −3  apps/fe/modules/sfGuardPermission/config/security.yml
  7. +0 −4 apps/fe/modules/sfGuardPermission/config/view.yml
  8. +0 −28 apps/fe/modules/sfGuardPermission/templates/editSuccess.php
  9. +0 −48 apps/fe/modules/sfGuardPermission/templates/indexSuccess.php
  10. +0 −26 apps/fe/modules/sfGuardPermission/templates/newSuccess.php
  11. +0 −2  apps/fe/modules/sfGuardUser/templates/indexSuccess.php
  12. +0 −2  apps/fe/modules/sfGuardUser/templates/newSuccess.php
  13. BIN  data/phpcollab_unit_test.db
  14. +0 −64 plugins/idProjectManagementPlugin/config/routing.yml
  15. +1 −0  plugins/idProjectManagementPlugin/lib/form/IdProjectForm.class.php
  16. +0 −45 plugins/idProjectManagementPlugin/lib/helper/__blaz__AutoLinkHelper.php
  17. +5 −0 plugins/idProjectManagementPlugin/lib/model/doctrine/PluginProjectUser.class.php
  18. +0 −76 plugins/idProjectManagementPlugin/lib/pager/idPager.php
  19. +1 −1  plugins/idProjectManagementPlugin/modules/idPriority/actions/actions.class.php
  20. +3 −3 plugins/idProjectManagementPlugin/modules/idProject/actions/actions.class.php
  21. +0 −46 plugins/idProjectManagementPlugin/modules/idProject/templates/_content_table.php
  22. +0 −32 plugins/idProjectManagementPlugin/modules/idProject/templates/_content_table_list.php
  23. +1 −1  plugins/idProjectManagementPlugin/modules/idProject/templates/_create_project_menu.php
  24. +0 −4 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_actions.php
  25. +0 −7 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_create_menu.php
  26. +0 −53 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_filters.php
  27. +0 −8 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_form_footer.php
  28. +0 −18 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_form_header.php
  29. +0 −16 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_th_as_ordering_links.php
  30. +1 −10 plugins/idProjectManagementPlugin/modules/idProject/templates/editSuccess.php
  31. +71 −7 plugins/idProjectManagementPlugin/modules/idProject/templates/newSuccess.php
  32. +1 −1  plugins/idProjectManagementPlugin/modules/idStatus/actions/actions.class.php
  33. +0 −9 test/fixtures/sfGuardGroup.yml
  34. +0 −294 test/fixtures/sfGuardGroupPermission.yml
  35. +0 −129 test/fixtures/sfGuardPermission.yml
  36. +0 −18 test/fixtures/sfGuardUserGroup.yml
  37. +6 −41 test/functional/fe/idProjectCreateTest.php
  38. +1 −6 test/functional/fe/idProjectEditTest.php
  39. +0 −29 test/functional/fe/idProjectGroupDeleteTest.php
  40. +0 −26 test/functional/fe/idProjectPermissionDeleteTest.php
  41. +0 −39 test/functional/fe/idProjectUserGroupCreateTest.php
  42. +0 −61 test/functional/fe/idProjectUserGroupEditTest.php
  43. +0 −40 test/functional/fe/idProjectUserGroupFilterTest.php
  44. +0 −60 test/functional/fe/idProjectUserGroupViewTest.php
  45. +0 −40 test/functional/fe/idProjectUserPermissionCreateTest.php
  46. +0 −60 test/functional/fe/idProjectUserPermissionEditTest.php
  47. +0 −40 test/functional/fe/idProjectUserPermissionFilterTest.php
  48. +0 −59 test/functional/fe/idProjectUserPermissionViewTest.php
  49. +0 −23 test/functional/fe/sfGuardGroupSubNavigationMenuTest.php
  50. +0 −23 test/functional/fe/sfGuardPermissionSubNavigationMenuTest.php
View
3  apps/fe/modules/sfGuardGroup/config/security.yml
@@ -1,3 +0,0 @@
-all:
- is_secure: true
- credentials: admin
View
4 apps/fe/modules/sfGuardGroup/config/view.yml
@@ -1,4 +0,0 @@
-default:
- components:
- sidebar: []
-
View
27 apps/fe/modules/sfGuardGroup/templates/editSuccess.php
@@ -1,27 +0,0 @@
-
-<?php slot('title', __('Edit a group')) ?>
-
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'group')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('Edit group') ?></h2>
- <div class="inner">
- <?php echo form_tag_for($form, '@sf_guard_group', array('class' =>'form')) ?>
-
- <?php include_partial('idProject/sf_guard_form_header', array('form' => $form, 'module_name' => 'group')); ?>
-
- <table class="table">
-
- <?php include_partial('idProject/content_table', array('configuration' => $configuration, 'form' => $form)); ?>
-
- </table>
-
- <?php include_partial('idProject/sf_guard_form_footer', array('form' => $form, 'module_name' => 'group')); ?>
-
- </form>
- </div>
- </div>
-</div>
View
48 apps/fe/modules/sfGuardGroup/templates/indexSuccess.php
@@ -1,48 +0,0 @@
-<?php slot('title', __('Manage groups')) ?>
-
-<?php include_partial('idProject/sf_guard_filters', array(
- 'form' => $filters,
- 'configuration' => $configuration,
- 'module_name' => 'group',
- 'fields' => array('name',
- 'description'),
- )); ?>
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'group')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('Groups list') ?></h2>
- <div class="inner">
- <table class="table">
-
- <tr>
- <th class="first">&nbsp;</th>
-
- <?php include_partial('idProject/sf_guard_th_as_ordering_links', array(
- 'sort' => $sort,
- 'module_name' => 'group',
- 'fields' => array(
- 'name',
- 'description'
- )
- )); ?>
-
- <th class="last"><?php echo __('Actions') ?></th>
- </tr>
-
- <?php include_partial('idProject/content_table_list', array(
- 'pager' => $pager,
- 'module_name' => 'group',
- 'fields' => array(
- 'name',
- 'description'
- )
- )); ?>
-
- </table>
-
- </div>
- </div>
-</div>
View
26 apps/fe/modules/sfGuardGroup/templates/newSuccess.php
@@ -1,26 +0,0 @@
-
-<?php slot('title', __('Create a new Group')) ?>
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'group')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('New group creation') ?></h2>
- <div class="inner">
- <?php echo form_tag_for($form, '@sf_guard_group', array('class' =>'form')) ?>
-
- <?php include_partial('idProject/sf_guard_form_header', array('form' => $form, 'module_name' => 'group')); ?>
-
- <table class="table">
-
- <?php include_partial('idProject/content_table', array('configuration' => $configuration, 'form' => $form)); ?>
-
- </table>
-
- <?php include_partial('idProject/sf_guard_form_footer', array('form' => $form, 'module_name' => 'group')); ?>
-
- </form>
- </div>
- </div>
-</div>
View
3  apps/fe/modules/sfGuardPermission/config/security.yml
@@ -1,3 +0,0 @@
-all:
- is_secure: true
- credentials: admin
View
4 apps/fe/modules/sfGuardPermission/config/view.yml
@@ -1,4 +0,0 @@
-default:
- components:
- sidebar: []
-
View
28 apps/fe/modules/sfGuardPermission/templates/editSuccess.php
@@ -1,28 +0,0 @@
-
-<?php slot('title', __('Edit a permission')) ?>
-
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'permission')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('Edit permission') ?></h2>
- <div class="inner">
- <?php echo form_tag_for($form, '@sf_guard_permission', array('class' =>'form')) ?>
-
- <?php include_partial('idProject/sf_guard_form_header', array('form' => $form, 'module_name' => 'permission')); ?>
-
- <table class="table">
-
- <?php include_partial('idProject/content_table', array('configuration' => $configuration, 'form' => $form)); ?>
-
- </table>
-
- <?php include_partial('idProject/sf_guard_form_footer', array('form' => $form, 'module_name' => 'permission')); ?>
-
- </form>
- </div>
- </div>
-</div>
-
View
48 apps/fe/modules/sfGuardPermission/templates/indexSuccess.php
@@ -1,48 +0,0 @@
-<?php slot('title', __('Manage permissions')) ?>
-
-<?php include_partial('idProject/sf_guard_filters', array(
- 'form' => $filters,
- 'configuration' => $configuration,
- 'module_name' => 'permission',
- 'fields' => array('name',
- 'description'),
- )); ?>
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'permission')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('Permissions list') ?></h2>
- <div class="inner">
- <table class="table">
-
- <tr>
- <th class="first">&nbsp;</th>
-
- <?php include_partial('idProject/sf_guard_th_as_ordering_links', array(
- 'sort' => $sort,
- 'module_name' => 'permission',
- 'fields' => array(
- 'name',
- 'description'
- )
- )); ?>
-
- <th class="last"><?php echo __('Actions') ?></th>
- </tr>
-
- <?php include_partial('idProject/content_table_list', array(
- 'pager' => $pager,
- 'module_name' => 'permission',
- 'fields' => array(
- 'name',
- 'description'
- )
- )); ?>
-
- </table>
-
- </div>
- </div>
-</div>
View
26 apps/fe/modules/sfGuardPermission/templates/newSuccess.php
@@ -1,26 +0,0 @@
-
-<?php slot('title', __('Create a new permission')) ?>
-
-<div class="block" id="block-tables">
-
- <?php include_partial('idProject/sf_guard_create_menu', array('module_name' => 'permission')); ?>
-
- <div class="content">
- <h2 class="title"><?php echo __('New permission creation') ?></h2>
- <div class="inner">
- <?php echo form_tag_for($form, '@sf_guard_permission', array('class' =>'form')) ?>
-
- <?php include_partial('idProject/sf_guard_form_header', array('form' => $form, 'module_name' => 'permission')); ?>
-
- <table class="table">
-
- <?php include_partial('idProject/content_table', array('configuration' => $configuration, 'form' => $form)); ?>
-
- </table>
-
- <?php include_partial('idProject/sf_guard_form_footer', array('form' => $form, 'module_name' => 'permission')); ?>
-
- </form>
- </div>
- </div>
-</div>
View
2  apps/fe/modules/sfGuardUser/templates/indexSuccess.php
@@ -4,8 +4,6 @@
<div class="span-full last project-navigation">
<ul>
<li><?php echo link_to('Users', '@sf_guard_user'); ?></li>
- <li><?php echo link_to('Groups', '@sf_guard_group'); ?></li>
- <li><?php echo link_to('Permissions', '@sf_guard_permission'); ?></li>
</ul>
</div>
View
2  apps/fe/modules/sfGuardUser/templates/newSuccess.php
@@ -4,8 +4,6 @@
<div class="span-full last project-navigation">
<ul>
<li><?php echo link_to('Users', '@sf_guard_user'); ?></li>
- <li><?php echo link_to('Groups', '@sf_guard_group'); ?></li>
- <li><?php echo link_to('Permissions', '@sf_guard_permission'); ?></li>
</ul>
</div>
View
BIN  data/phpcollab_unit_test.db
Binary file not shown
View
64 plugins/idProjectManagementPlugin/config/routing.yml
@@ -22,70 +22,6 @@ sf_guard_password:
requirements:
sf_culture: (?:en|it)
-sf_guard_group:
- url: /:sf_culture/sfGuardGroup
- param: { module: sfGuardGroup, action: index }
- requirements:
- sf_culture: (?:en|it)
-
-sf_guard_group_edit:
- url: /:sf_culture/sfGuardGroup/:id/edit
- class: sfDoctrineRoute
- options: { model: sfGuardGroup, type: object }
- param: { module: sfGuardGroup, action: edit }
- requirements:
- id: \d+
- sf_culture: (?:en|it)
-
-sf_guard_group_new:
- url: /:sf_culture/sfGuardGroup/new
- class: sfDoctrineRoute
- options: { model: sfGuardGroup, type: object }
- param: { module: sfGuardGroup, action: new }
- requirements:
- sf_culture: (?:en|it)
-
-sf_guard_group_delete:
- url: /:sf_culture/sfGuardGroup/:id/delete
- class: sfDoctrineRoute
- options: { model: sfGuardGroup, type: object }
- param: { module: sfGuardGroup, action: delete }
- requirements:
- id: \d+
- sf_culture: (?:en|it)
-
-sf_guard_permission:
- url: /:sf_culture/sfGuardPermission
- param: { module: sfGuardPermission, action: index }
- requirements:
- sf_culture: (?:en|it)
-
-sf_guard_permission_edit:
- url: /:sf_culture/sfGuardPermission/:id/edit
- class: sfDoctrineRoute
- options: { model: sfGuardPermission, type: object }
- param: { module: sfGuardPermission, action: edit }
- requirements:
- id: \d+
- sf_culture: (?:en|it)
-
-sf_guard_permission_new:
- url: /:sf_culture/sfGuardPermission/new
- class: sfDoctrineRoute
- options: { model: sfGuardPermission, type: object }
- param: { module: sfGuardPermission, action: new }
- requirements:
- sf_culture: (?:en|it)
-
-sf_guard_permission_delete:
- url: /:sf_culture/sfGuardPermission/:id/delete
- class: sfDoctrineRoute
- options: { model: sfGuardPermission, type: object }
- param: { module: sfGuardPermission, action: delete }
- requirements:
- id: \d+
- sf_culture: (?:en|it)
-
sf_guard_user:
url: /:sf_culture/idUsers
param: { module: sfGuardUser, action: index }
View
1  plugins/idProjectManagementPlugin/lib/form/IdProjectForm.class.php
@@ -60,5 +60,6 @@ public function configure()
unset($this['costs']);
unset($this['created_at']);
unset($this['updated_at']);
+ unset($this['is_public']);
}
}
View
45 plugins/idProjectManagementPlugin/lib/helper/__blaz__AutoLinkHelper.php
@@ -1,45 +0,0 @@
-<?php
-
-use_helper('Text');
-
-/**
- * This file is part of the phpCollab3 package.
- * (c) 2009 Ideato s.r.l. <phpcollab@ideato.it>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- *
- * pager_navigation function
- *
- * @package phpCollab3
- * @subpackage idProjectManagementPlugin Helpers
- */
-
-/**
- * Helper for displaying formatted text
- *
- * @package phpCollab3
- * @subpackage idProjectManagementPlugin Helpers
- * @author Filippo (p16) De Santis <fd@ideato.it>
- * @author Andrea (giorg) Giorgini <ag@ideato.it>
- */
-function auto_link($text, $link = 'all')
-{
- if ($link == 'all')
- {
- return _auto_link(_auto_link_email_addresses($text));
- }
- else if ($link == 'email_addresses')
- {
- return _auto_link_email_addresses($text);
- }
- else if ($link == 'urls')
- {
- return _auto_link($text);
- }
-}
-
-function _auto_link($text)
-{
- return preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1">$1</a>', $text);
-}
View
5 plugins/idProjectManagementPlugin/lib/model/doctrine/PluginProjectUser.class.php
@@ -35,4 +35,9 @@ public static function getRoleByProfileIdAndProjectId($profile_id, $project_id)
return $roles[$code];
}
}
+
+ public static function getCodesAndRoles()
+ {
+ return array_flip(self::$roles);
+ }
}
View
76 plugins/idProjectManagementPlugin/lib/pager/idPager.php
@@ -1,76 +0,0 @@
-<?php
-/**
- * This file is part of the phpCollab3 package.
- * (c) 2009 Ideato s.r.l. <phpcollab@ideato.it>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- *
- * idPager.php
- *
- * @package phpCollab3
- * @subpackage idProjectManagementPlugin Model
- */
-
-
-/**
- * Pager for an array of objects.
- *
- * @package phpCollab3
- * @author Filippo (p16) De Santis <fd@ideato.it>
- * @subpackage idProjectManagementPlugin Model
- */
-class idPager extends sfPager
-{
- protected $resultsArray = null;
-
- public function __construct($class = null, $maxPerPage = 10)
- {
- parent::__construct($class, $maxPerPage);
- }
-
- public function init()
- {
- $this->setNbResults(count($this->resultsArray));
-
- if (($this->getPage() == 0 || $this->getMaxPerPage() == 0))
- {
- $this->setLastPage(0);
- }
- else
- {
- $this->setLastPage(ceil($this->getNbResults() / $this->getMaxPerPage()));
- }
- }
-
- private function convertToArray($array)
- {
- $results = array();
- foreach ($array as $object)
- {
- $results[] = $object;
- }
-
- return $results;
- }
-
- public function setResultArray($array)
- {
- $this->resultsArray = ($array instanceof Doctrine_Collection) ? $this->convertToArray($array) : $array;
- }
-
- public function getResultArray()
- {
- return $this->resultsArray;
- }
-
- public function retrieveObject($offset) {
- return $this->resultsArray[$offset];
- }
-
- public function getResults()
- {
- return array_slice($this->resultsArray, ($this->getPage() - 1) * $this->getMaxPerPage(), $this->maxPerPage);
- }
-
-}
View
2  plugins/idProjectManagementPlugin/modules/idPriority/actions/actions.class.php
@@ -45,7 +45,7 @@ protected function retrievePrioritiesList()
*/
public function executeIndex(sfWebRequest $request)
{
- $this->forwardUnless(($this->getUser()->isAdmin() || $this->getUser()->isProjectManager()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
+ $this->forwardUnless(($this->getUser()->isAdmin()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->priority_list = $this->retrievePrioritiesList();
}
View
6 plugins/idProjectManagementPlugin/modules/idProject/actions/actions.class.php
@@ -99,7 +99,7 @@ public function executeIndex(sfWebRequest $request)
*/
public function executeNew(sfWebRequest $request)
{
- $this->forwardUnless(($this->getUser()->isAdmin() || $this->getUser()->isProjectManager()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
+ $this->forwardUnless(($this->getUser()->isAdmin()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->form = new idProjectForm();
$this->form->setDefault('starting_date', date('Y-m-d H:i:s', time()));
}
@@ -127,7 +127,7 @@ public function executeCreate(sfWebRequest $request)
*/
public function executeEdit(sfWebRequest $request)
{
- $this->forwardUnless(($this->getUser()->isAdmin() || $this->getUser()->isProjectManager()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
+ $this->forwardUnless(($this->getUser()->isAdmin()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->forward404Unless($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('id'))), sprintf('Object project does not exist (%s).', array($request->getParameter('id'))));
$this->form = new idProjectForm($this->project);
@@ -157,7 +157,7 @@ public function executeUpdate(sfWebRequest $request)
*/
public function executeDelete(sfWebRequest $request)
{
- $this->forwardUnless(($this->getUser()->isAdmin() || $this->getUser()->isProjectManager()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
+ $this->forwardUnless(($this->getUser()->isAdmin()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$request->checkCSRFProtection();
View
46 plugins/idProjectManagementPlugin/modules/idProject/templates/_content_table.php
@@ -1,46 +0,0 @@
-<?php $ii=0; ?>
-<?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?>
- <?php $ii++; ?>
- <?php foreach ($fields as $name => $field): ?>
-
- <?php if (isset($form[$name])) : ?>
- <?php if ($form[$name]->isHidden() || (!isset($form[$name]) && $field->isReal())) continue ?>
-
- <?php if ($name == 'Profile'): ?>
- <tr>
- <td>&nbsp;</td>
-
- <td><?php echo $form['Profile']['first_name']->renderLabel() ?></td>
- <td><?php echo $form['Profile']['first_name']->renderError() ?><?php echo $form['Profile']['first_name']->render() ?></td>
-
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td>&nbsp;</td>
-
- <td><?php echo $form['Profile']['last_name']->renderLabel() ?></td>
- <td><?php echo $form['Profile']['last_name']->renderError() ?><?php echo $form['Profile']['last_name']->render() ?></td>
-
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td>&nbsp;</td>
-
- <td><?php echo $form['Profile']['email']->renderLabel() ?></td>
- <td><?php echo $form['Profile']['email']->renderError() ?><?php echo $form['Profile']['email']->render() ?></td>
-
- <td>&nbsp;</td>
- </tr>
- <?php continue; endif;?>
-
- <tr>
- <td>&nbsp;</td>
-
- <td><?php echo $form[$name]->renderLabel() ?></td>
- <td><?php echo $form[$name]->renderError('<br/>') ?><?php echo $form[$name]->render() ?></td>
-
- <td>&nbsp;</td>
- </tr>
- <?php endif; ?>
- <?php endforeach; ?>
-<?php endforeach; ?>
View
32 plugins/idProjectManagementPlugin/modules/idProject/templates/_content_table_list.php
@@ -1,32 +0,0 @@
-<?php foreach ($pager->getResults() as $i => $sf_guard_object): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
- <tr class="<?php echo $odd ?>">
- <td class="first">&nbsp;</td>
-
- <?php foreach ($fields as $ii => $field): ?>
-
- <?php if ($ii == 0): ?>
- <td><?php echo link_to($sf_guard_object[$field], 'sf_guard_'.$module_name.'_edit', $sf_guard_object) ?></td>
- <?php else: ?>
- <td><?php echo $sf_guard_object[$field] ?></td>
- <?php endif; ?>
-
- <?php endforeach; ?>
- <td>
- <?php include_partial('idProject/sf_guard_actions', array('sf_guard_object' => $sf_guard_object, 'module_name' => $module_name)); ?>
- </td>
-
- </tr>
-<?php endforeach; ?>
-
- <tr>
- <td colspan="6">
- <?php if ($pager->haveToPaginate()): ?>
- <?php include_partial('sfGuard'.ucfirst($module_name).'/pagination', array('pager' => $pager)) ?>
- <?php endif; ?>
-
- <?php echo format_number_choice('[0] no result|[1] 1 result|(1,+Inf] %1% results', array('%1%' => $pager->getNbResults()), $pager->getNbResults(), 'sf_admin') ?>
- <?php if ($pager->haveToPaginate()): ?>
- <?php echo __('(page %%page%%/%%nb_pages%%)', array('%%page%%' => $pager->getPage(), '%%nb_pages%%' => $pager->getLastPage()), 'sf_admin') ?>
- <?php endif; ?>
- </td>
-</tr>
View
2  plugins/idProjectManagementPlugin/modules/idProject/templates/_create_project_menu.php
@@ -1,6 +1,6 @@
<div class="secondary-navigation">
<ul>
- <?php if($sf_user->isAdmin() || $sf_user->isProjectManager()): ?>
+ <?php if($sf_user->isAdmin()): ?>
<li class="first active"><?php echo link_to( __('Create new project'), '@new_project') ?></li>
<?php if($action == 'show'): ?>
<li><?php echo link_to( __('Add user(s)'), '@edit_project?id='.$sf_request->getParameter('id')) ?></li>
View
4 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_actions.php
@@ -1,4 +0,0 @@
-<ul>
- <?php echo '<li>'.link_to(__('Edit'), '@sf_guard_'.$module_name.'_edit?id='.$sf_guard_object->getId()).'</li>' ?>
- <?php echo '<li>'.link_to(__('Delete'), '@sf_guard_'.$module_name.'_delete?id='.$sf_guard_object->getId(), array('confirm' => __('Do you really want to delete this '.$module_name.'?'))).'</li>' ?>
-</ul>
View
7 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_create_menu.php
@@ -1,7 +0,0 @@
-<div class="secondary-navigation">
- <ul>
- <li class="first active"><?php echo link_to( __('Create new '.$module_name), '@sf_guard_'.$module_name.'_new') ?></li>
- <li><?php echo link_to( __(ucfirst($module_name).'s list'), 'sf_guard_'.$module_name) ?></li>
- </ul>
- <div class="clear"></div>
-</div>
View
53 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_filters.php
@@ -1,53 +0,0 @@
-<div class="block" id="block-filters">
- <div class="content">
- <h2 class="title"><?php echo __(ucfirst($module_name).' filters') ?></h2>
- <div class="inner">
-
- <?php if ($form->hasGlobalErrors()): ?>
- <div class="flash">
- <div class="message error">
- <p><?php echo $form->renderGlobalErrors() ?></p>
- </div>
- </div>
- <?php endif; ?>
-
- <form action="<?php echo url_for('sf_guard_'.$module_name.'_collection', array('action' => 'filter')) ?>" method="post">
- <table class="table">
- <tr>
- <th class="first">&nbsp;</th>
- <th><?php echo __('Filter by') ?>:</th>
-
- <?php foreach ($fields as $field): ?>
- <th><?php echo __(ucfirst(str_replace('_',' ',$field))) ?></th>
- <?php endforeach;?>
-
- <th class="last">&nbsp;</th>
- </tr>
-
-
- <tr class="odd">
- <td>&nbsp;</td>
- <td>&nbsp;</td>
-
- <?php foreach ($fields as $field): ?>
- <td><?php echo $form[$field]->renderError('<br/>') ?><?php echo $form[$field] ?></td>
- <?php endforeach;?>
-
- <td>&nbsp;</td>
- </tr>
-
-
-
- </table>
- <div class="actions-bar">
- <div class="actions">
- <?php echo $form->renderHiddenFields() ?>
- <?php echo link_to(__('Reset'), 'sf_guard_'.$module_name.'_collection', array('action' => 'filter'), array('query_string' => '_reset', 'method' => 'post')) ?>
- <input type="submit" value="<?php echo __('Filter', array(), 'sf_admin') ?>" class="button" />
- </div>
- <div class="clear"></div>
- </div>
- </form>
- </div>
- </div>
-</div>
View
8 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_form_footer.php
@@ -1,8 +0,0 @@
-<div class="actions-bar">
- <div class="actions">
- <?php echo (!$form->isNew()) ? link_to(__('Delete'), '@sf_guard_'.$module_name.'_delete?id='.$form->getObject()->getId(), array('confirm' => __('Do you really want to delete this '.$module_name.'?'))).' | ' : '' ;?>
- <?php echo link_to(__('Cancel'), 'sf_guard_'.$module_name); ?> |
- <?php echo input_tag('Submit', ($form->isNew()) ? __('Save') : __('Save modification'), array('class' => 'button', 'type' => 'submit'))?>
- </div>
- <div class="clear"></div>
-</div>
View
18 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_form_header.php
@@ -1,18 +0,0 @@
-<?php echo $form->renderHiddenFields() ?>
-
-<?php if ($sf_user->hasFlash('notice')): ?>
- <div class="flash">
- <div class="message notice">
- <p><?php echo __($sf_user->getFlash('notice'), array(), 'sf_admin') ?></p>
- </div>
- </div>
-<?php endif; ?>
-
-<?php if ($sf_user->hasFlash('error')): ?>
- <div class="flash">
- <div class="message error">
- <p><?php echo __($sf_user->getFlash('error'), array(), 'sf_admin') ?></p>
- <p><?php echo $form->renderGlobalErrors() ?></p>
- </div>
- </div>
-<?php endif; ?>
View
16 plugins/idProjectManagementPlugin/modules/idProject/templates/_sf_guard_th_as_ordering_links.php
@@ -1,16 +0,0 @@
-
-<?php foreach ($fields as $field): ?>
-
- <?php slot('sf_admin.current_header') ?>
- <th>
- <?php if ($field == $sort[0]): ?>
- <?php echo link_to(__(ucfirst(str_replace('_',' ',$field)), array(), 'messages'), 'sfGuard'.ucfirst($module_name).'/index?sort='.$field.'&sort_type='.($sort[1] == 'asc' ? 'desc' : 'asc')) ?>
- <?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/'.$sort[1].'.png', array('alt' => __($sort[1], array(), 'sf_admin'), 'title' => __($sort[1], array(), 'sf_admin'))) ?>
- <?php else: ?>
- <?php echo link_to(__(ucfirst(str_replace('_',' ',$field)), array(), 'messages'), 'sfGuard'.ucfirst($module_name).'/index?sort='.$field.'&sort_type=asc') ?>
- <?php endif; ?>
- </th>
- <?php end_slot(); ?>
- <?php include_slot('sf_admin.current_header') ?>
-
-<?php endforeach; ?>
View
11 plugins/idProjectManagementPlugin/modules/idProject/templates/editSuccess.php
@@ -1,10 +1 @@
-<?php slot('title', __('Edit Project')) ?>
-<div class="block" id="block-forms">
- <?php include_partial('create_project_menu', array('action' => 'edit', 'project' => $project)); ?>
- <div class="content">
- <div class="inner">
- <?php include_partial('form', array('form' => $form)) ?>
-
- </div>
- </div>
-</div>
+<?php require_once 'newSuccess.php' ?>
View
78 plugins/idProjectManagementPlugin/modules/idProject/templates/newSuccess.php
@@ -1,11 +1,75 @@
-<?php slot('title', __('Project Creation')) ?>
-
-<div class="block" id="block-forms">
- <?php include_partial('create_project_menu', array('action' => 'new')); ?>
- <div class="content">
- <div class="inner">
- <?php include_partial('form', array('form' => $form)) ?>
+<?php slot('title', __('Edit project')) ?>
+<div class="span-23" id="content">
+ <div class="span-full">
+ <div class="title">
+ <span>Edit project</span>
</div>
+
+ <form id="new" action="<?php echo url_for('idProject/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getid() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?> class="form">
+ <?php if ($form->hasGlobalErrors()): ?>
+ <div class="error">
+ <?php echo $form->renderGlobalErrors() ?>
+ </div>
+ <?php endif; ?>
+
+ <div class="span-22 last">
+ <?php echo $form['name']->renderError() ?>
+ <?php echo $form['name']->renderLabel() ?><br/>
+ <?php echo $form['name'] ?>
+ </div>
+ <div class="span-22 last">
+ <?php echo $form['description']->renderError() ?>
+ <?php echo $form['description']->renderLabel() ?><br/>
+ <?php echo $form['description'] ?>
+ </div>
+ <div class="clear"></div>
+
+ <div class="span-21 last menu prepend-1">Specifications</div>
+ <div class="span-11 date">
+ <?php echo $form['starting_date']->renderError() ?>
+ <?php echo $form['starting_date']->renderLabel() ?><br/>
+ <?php echo $form['starting_date'] ?>
+ </div>
+ <div class="span-11 last date">
+ <?php echo $form['end_date']->renderError() ?>
+ <?php echo $form['end_date']->renderLabel() ?><br/>
+ <?php echo $form['end_date'] ?>
+ </div>
+ <div class="clear"></div>
+ <div class="span-11">
+ <?php echo $form['trackers_list']->renderError() ?>
+ <?php echo $form['trackers_list']->renderLabel() ?><br/>
+ <?php echo $form['trackers_list'] ?>
+ </div>
+ <div class="span-11 last">
+ <?php echo $form['budget']->renderError() ?>
+ <?php echo $form['budget']->renderLabel() ?><br/>
+ <?php echo $form['budget'] ?>
+ </div>
+ <div class="clear"></div>
+
+ <div class="span-21 last menu prepend-1">Users</div>
+ <div class="span-22 last">
+ <?php echo $form['users_list']->renderError() ?>
+ <?php echo $form['users_list']->renderLabel() ?><br/>
+ <?php echo $form['users_list'] ?>
+ </div>
+ <div class="clear"></div>
+
+ <div class="span-3">
+ <input class="button block-green medium-round" type="submit" value="<?php echo $form->getObject()->isNew() ? __('Create a new project') : __('Update the project') ?>" />
+ </div>
+ <div class="span-16">&nbsp;
+ <?php if (!$form->getObject()->isNew()): ?>
+ <?php echo link_to(__('Delete'), '@delete_project?id='.$project->id, array('method' => 'delete', 'confirm' => __('Do you really want to delete this project?'))) ?>
+ <?php endif; ?>
+ <?php echo $form->renderHiddenFields() ?>
+ </div>
+ <div class="span-3 last">
+ <a href="<?php echo url_for('@index_project') ?>" class="button block-red medium-round"><?php echo __('Cancel'); ?></a>
+ </div>
+ <div class="clear"></div>
+ </form>
</div>
</div>
View
2  plugins/idProjectManagementPlugin/modules/idStatus/actions/actions.class.php
@@ -34,7 +34,7 @@ protected function getQueryForStatusesList()
*/
public function executeIndex(sfWebRequest $request)
{
- $this->forwardUnless(($this->getUser()->isAdmin() || $this->getUser()->isProjectManager()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
+ $this->forwardUnless(($this->getUser()->isAdmin()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->status_list = $this->getQueryForStatusesList()->execute();
}
View
9 test/fixtures/sfGuardGroup.yml
@@ -2,12 +2,3 @@ sfGuardGroup:
sfGuardGroup_1:
name: admin
description: 'Administrator group'
- sfGuardGroup_2:
- name: user
- description: 'User group'
- sfGuardGroup_3:
- name: 'project managers'
- description: 'Project managers group'
- sfGuardGroup_4:
- name: customer
- description: 'Customer managers group'
View
294 test/fixtures/sfGuardGroupPermission.yml
@@ -2,297 +2,3 @@ sfGuardGroupPermission:
sfGuardGroupPermission_1_1:
sfGuardGroup: sfGuardGroup_1
sfGuardPermission: sfGuardPermission_1
- sfGuardGroupPermission_1_3:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_3
- sfGuardGroupPermission_1_4:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_4
- sfGuardGroupPermission_1_5:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_5
- sfGuardGroupPermission_1_6:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_6
- sfGuardGroupPermission_1_11:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_11
- sfGuardGroupPermission_1_12:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_12
- sfGuardGroupPermission_1_13:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_13
- sfGuardGroupPermission_1_14:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_14
- sfGuardGroupPermission_1_15:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_15
- sfGuardGroupPermission_1_16:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_16
- sfGuardGroupPermission_1_17:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_17
- sfGuardGroupPermission_1_18:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_18
- sfGuardGroupPermission_1_19:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_19
- sfGuardGroupPermission_1_20:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_20
- sfGuardGroupPermission_1_21:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_21
- sfGuardGroupPermission_1_22:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_22
- sfGuardGroupPermission_1_23:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_23
- sfGuardGroupPermission_1_24:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_24
- sfGuardGroupPermission_1_25:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_25
- sfGuardGroupPermission_1_26:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_26
- sfGuardGroupPermission_1_27:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_27
- sfGuardGroupPermission_1_28:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_28
- sfGuardGroupPermission_1_29:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_29
- sfGuardGroupPermission_1_30:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_30
- sfGuardGroupPermission_1_31:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_31
- sfGuardGroupPermission_1_32:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_32
- sfGuardGroupPermission_1_33:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_33
- sfGuardGroupPermission_1_34:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_34
- sfGuardGroupPermission_1_35:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_35
- sfGuardGroupPermission_1_36:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_36
- sfGuardGroupPermission_1_37:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_37
- sfGuardGroupPermission_1_38:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_38
- sfGuardGroupPermission_1_39:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_39
- sfGuardGroupPermission_1_40:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_40
- sfGuardGroupPermission_1_41:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_41
- sfGuardGroupPermission_1_42:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_42
- sfGuardGroupPermission_1_43:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_43
- sfGuardGroupPermission_1_44:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_44
- sfGuardGroupPermission_1_45:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_45
- sfGuardGroupPermission_1_46:
- sfGuardGroup: sfGuardGroup_1
- sfGuardPermission: sfGuardPermission_46
- sfGuardGroupPermission_2_2:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_2
- sfGuardGroupPermission_2_11:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_11
- sfGuardGroupPermission_2_12:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_12
- sfGuardGroupPermission_2_13:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_13
- sfGuardGroupPermission_2_14:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_14
- sfGuardGroupPermission_2_15:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_15
- sfGuardGroupPermission_2_16:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_16
- sfGuardGroupPermission_2_20:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_20
- sfGuardGroupPermission_2_21:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_21
- sfGuardGroupPermission_2_22:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_22
- sfGuardGroupPermission_2_23:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_23
- sfGuardGroupPermission_2_24:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_24
- sfGuardGroupPermission_2_29:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_29
- sfGuardGroupPermission_2_30:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_30
- sfGuardGroupPermission_2_31:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_31
- sfGuardGroupPermission_2_36:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_36
- sfGuardGroupPermission_2_37:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_37
- sfGuardGroupPermission_2_38:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_38
- sfGuardGroupPermission_2_39:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_39
- sfGuardGroupPermission_2_40:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_40
- sfGuardGroupPermission_2_43:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_43
- sfGuardGroupPermission_2_44:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_44
- sfGuardGroupPermission_2_45:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_45
- sfGuardGroupPermission_2_46:
- sfGuardGroup: sfGuardGroup_2
- sfGuardPermission: sfGuardPermission_46
- sfGuardGroupPermission_3_pm:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_pm
- sfGuardGroupPermission_3_11:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_11
- sfGuardGroupPermission_3_12:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_12
- sfGuardGroupPermission_3_13:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_13
- sfGuardGroupPermission_3_14:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_14
- sfGuardGroupPermission_3_15:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_15
- sfGuardGroupPermission_3_16:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_16
- sfGuardGroupPermission_3_17:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_17
- sfGuardGroupPermission_3_18:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_18
- sfGuardGroupPermission_3_19:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_19
- sfGuardGroupPermission_3_20:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_20
- sfGuardGroupPermission_3_21:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_21
- sfGuardGroupPermission_3_22:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_22
- sfGuardGroupPermission_3_23:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_23
- sfGuardGroupPermission_3_24:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_24
- sfGuardGroupPermission_3_29:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_29
- sfGuardGroupPermission_3_30:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_30
- sfGuardGroupPermission_3_31:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_31
- sfGuardGroupPermission_3_32:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_32
- sfGuardGroupPermission_3_33:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_33
- sfGuardGroupPermission_3_34:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_34
- sfGuardGroupPermission_3_35:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_35
- sfGuardGroupPermission_3_36:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_36
- sfGuardGroupPermission_3_37:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_37
- sfGuardGroupPermission_3_38:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_38
- sfGuardGroupPermission_3_39:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_39
- sfGuardGroupPermission_3_40:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_40
- sfGuardGroupPermission_3_41:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_41
- sfGuardGroupPermission_3_42:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_42
- sfGuardGroupPermission_3_43:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_43
- sfGuardGroupPermission_3_44:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_44
- sfGuardGroupPermission_3_45:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_45
- sfGuardGroupPermission_3_46:
- sfGuardGroup: sfGuardGroup_3
- sfGuardPermission: sfGuardPermission_46
- sfGuardGroupPermission_4_c:
- sfGuardGroup: sfGuardGroup_4
- sfGuardPermission: sfGuardPermission_c
View
129 test/fixtures/sfGuardPermission.yml
@@ -1,133 +1,4 @@
sfGuardPermission:
- sfGuardPermission_pm:
- name: 'project manager'
- description: 'Project manager permission'
- sfGuardPermission_c:
- name: customer
- description: 'Customer permission'
sfGuardPermission_1:
name: admin
description: 'Administrator permission'
- sfGuardPermission_2:
- name: user
- description: 'Basic user permission'
- sfGuardPermission_3:
- name: idPriority-Read
- description: 'Reading priorities permission'
- sfGuardPermission_4:
- name: idPriority-Create
- description: 'Creating priorities permission'
- sfGuardPermission_5:
- name: idPriority-Edit
- description: 'Editing priorities permission'
- sfGuardPermission_6:
- name: idPriority-Delete
- description: 'Deleting priorities permission'
- sfGuardPermission_11:
- name: idMilestone-Read
- description: 'Reading milestones permission'
- sfGuardPermission_12:
- name: idMilestone-Create
- description: 'Creating milestones permission'
- sfGuardPermission_13:
- name: idMilestone-Edit
- description: 'Editing milestones permission'
- sfGuardPermission_14:
- name: idMilestone-Delete
- description: 'Deleting milestones permission'
- sfGuardPermission_15:
- name: idDashboard-Read
- description: 'Reading dashboard permission'
- sfGuardPermission_16:
- name: idProject-Read
- description: 'Reading projects permission'
- sfGuardPermission_17:
- name: idProject-Create
- description: 'Creating projects permission'
- sfGuardPermission_18:
- name: idProject-Edit
- description: 'Editing projects permission'
- sfGuardPermission_19:
- name: idProject-Delete
- description: 'Deleting projects permission'
- sfGuardPermission_20:
- name: idProject-ViewRoadmap
- description: 'View projects roadmap permission'
- sfGuardPermission_21:
- name: idIssue-Read
- description: 'Reading issues permission'
- sfGuardPermission_22:
- name: idIssue-Create
- description: 'Creating issues permission'
- sfGuardPermission_23:
- name: idIssue-Edit
- description: 'Editing issues permission'
- sfGuardPermission_24:
- name: idIssue-Delete
- description: 'Deleting issues permission'
- sfGuardPermission_25:
- name: idStatus-Read
- description: 'Reading statuses permission'
- sfGuardPermission_26:
- name: idStatus-Create
- description: 'Creating statuses permission'
- sfGuardPermission_27:
- name: idStatus-Edit
- description: 'Editing statuses permission'
- sfGuardPermission_28:
- name: idStatus-Delete
- description: 'Deleting statuses permission'
- sfGuardPermission_29:
- name: idRepository-Read
- description: 'Reading repository permission'
- sfGuardPermission_30:
- name: idProfile-Read
- description: 'Reading profile permission'
- sfGuardPermission_31:
- name: idProfile-Edit
- description: 'Editing profile permission'
- sfGuardPermission_32:
- name: idTracker-Read
- description: 'Reading trackers permission'
- sfGuardPermission_33:
- name: idTracker-Create
- description: 'Creating trackers permission'
- sfGuardPermission_34:
- name: idTracker-Edit
- description: 'Editing trackers permission'
- sfGuardPermission_35:
- name: idTracker-Delete
- description: 'Deleting trackers permission'
- sfGuardPermission_36:
- name: idLogotime-Read
- description: 'Reading logtime permission'
- sfGuardPermission_37:
- name: idLogotime-Create
- description: 'Creating logtime permission'
- sfGuardPermission_38:
- name: idLogotime-Edit
- description: 'Editing logtime permission'
- sfGuardPermission_39:
- name: idLogotime-Delete
- description: 'Deleting logtime permission'
- sfGuardPermission_40:
- name: idLogotime-ReadReport
- description: 'reading logtime report permission'
- sfGuardPermission_41:
- name: idLogotime-ReadReportForAllUsers
- description: 'reading logtime report for all users permission'
- sfGuardPermission_42:
- name: idGantt-View
- description: 'View gantt permission'
- sfGuardPermission_43:
- name: idMessage-Read
- description: 'Reading message permission'
- sfGuardPermission_44:
- name: idMessage-Create
- description: 'Creating message permission'
- sfGuardPermission_45:
- name: idMessage-Edit
- description: 'Editing message permission'
- sfGuardPermission_46:
- name: idMessage-Delete
- description: 'Deleting message permission'
View
18 test/fixtures/sfGuardUserGroup.yml
@@ -1,22 +1,4 @@
sfGuardUserGroup:
- sfGuardUserGroup_8_4:
- sfGuardUser: sfGuardUser_8
- sfGuardGroup: sfGuardGroup_4
sfGuardUserGroup_1_1:
sfGuardUser: sfGuardUser_1
sfGuardGroup: sfGuardGroup_1
- sfGuardUserGroup_2_2:
- sfGuardUser: sfGuardUser_2
- sfGuardGroup: sfGuardGroup_2
- sfGuardUserGroup_3_2:
- sfGuardUser: sfGuardUser_3
- sfGuardGroup: sfGuardGroup_2
- sfGuardUserGroup_5_2:
- sfGuardUser: sfGuardUser_5
- sfGuardGroup: sfGuardGroup_2
- sfGuardUserGroup_6_2:
- sfGuardUser: sfGuardUser_6
- sfGuardGroup: sfGuardGroup_2
- sfGuardUserGroup_7_3:
- sfGuardUser: sfGuardUser_7
- sfGuardGroup: sfGuardGroup_3
View
47 test/functional/fe/idProjectCreateTest.php
@@ -38,7 +38,6 @@
checkElement('label:contains("Id")', false)->
checkElement('label:contains("Name")')->
checkElement('label:contains("Description")')->
- checkElement('label:contains("Public")')->
checkElement('label:contains("Starting date")')->
checkElement('label:contains("End date")')->
checkElement('label:contains("Updated at")', false)->
@@ -78,44 +77,10 @@
;
$browser->
-click('Login', array('signin' => array('username' => 'pmanager', 'password' => 'pmanager')))->
-followRedirect()->
-
-get('/en/idProject/new')->
-
- with('request')->begin()->
- isParameter('module', 'idProject')->
- isParameter('action', 'new')->
- end()->
-
- with('response')->begin()->
- isStatusCode(200)->
-
- checkElement('label:contains("Id")', false)->
- checkElement('label:contains("Name")')->
- checkElement('label:contains("Description")')->
- checkElement('label:contains("Public")')->
- checkElement('label:contains("Starting date")')->
- checkElement('label:contains("End date")')->
- checkElement('label:contains("Updated at")', false)->
- checkElement('input:contains("Create")', false)->
- end()
-;
-
-$browser->info('Creation of a new project')->
-
- click('Create a new project', array('project' => array(
- 'name' => 'NewProject2',
- 'description' => 'what a beautiful new project2!!',
- 'users_list' => array('7')
- )))->
-
+ get('/')->
+ click('Login', array('signin' => array('username' => 'pmanager', 'password' => 'pmanager')))->
followRedirect()->
- with('request')->begin()->
- isParameter('module', 'idProject')->
- isParameter('action', 'show')->
- end()->
-
- responseContains('NewProject2')->
- responseContains('what a beautiful new project2!!')
-;
+ get('/en/idProject/new')->
+ with('response')->begin()->
+ isStatusCode(403)->
+ end();
View
7 test/functional/fe/idProjectEditTest.php
@@ -31,18 +31,13 @@
checkElement('label:contains("Name")')->
checkElement('label:contains("Description")')->
- checkElement('label:contains("Public")')->
checkElement('select[id="project_trackers_list"]')->
- checkElement('label:contains("Project trackers")')->
-
info('Update a project')->
click('Update the project', array('project' => array(
'name' => 'Il mio primo progetto updatato',
- 'description' => 'Il primo 222 progetto creato con il plugin idProjectManagementPlugin',
- 'is_public' => 0,
- )))->
+ 'description' => 'Il primo 222 progetto creato con il plugin idProjectManagementPlugin')))->
end();
View
29 test/functional/fe/idProjectGroupDeleteTest.php
@@ -1,29 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-$browser->
-
-get('/')->
-
-click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
-
- followRedirect()->
-
- get('/en/sfGuardGroup')->
-
- with('response')->begin()->
- checkElement('tr', 8)->
- end()->
-
- click('Delete', array(), array('position' => 2))->
-
- followRedirect()->
-
- with('response')->begin()->
- checkElement('tr', 7)->
- end()
-;
View
26 test/functional/fe/idProjectPermissionDeleteTest.php
@@ -1,26 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-$browser->
-
-get('/')->
-
-click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
-
- followRedirect()->
-
- //click('Permissions')->
- get('/en/sfGuardPermission')->
-
- responseContains('44 results')->
-
- click('Delete', array(), array('position' => 2))->
-
- followRedirect()->
-
- responseContains('43 results')
-;
View
39 test/functional/fe/idProjectUserGroupCreateTest.php
@@ -1,39 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
- get('/')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Groups')->
- get('/en/sfGuardGroup')->
-
- click('Create new group')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'new')->
- end()->
-
- click('Save', array('sf_guard_group' => array(
- 'name' => 'new group',
- 'description' => 'group for new people',
- 'permissions_list' => array('2'=>'user'),
- 'users_list' => array('2'=>'user'),
- )))->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'create')->
- end()->
-
- responseContains('new group')->
- responseContains('group for new people')
-;
View
61 test/functional/fe/idProjectUserGroupEditTest.php
@@ -1,61 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
- get('/')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Groups')->
- get('/en/sfGuardGroup')->
-
- click('user')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'edit')->
- end()->
-
- with('response')->begin()->
- isStatusCode(200)->
-
- checkElement('label:contains("Id")', false)->
- checkElement('label:contains("Name")')->
- checkElement('label:contains("Description")')->
- checkElement('label:contains("Permissions")')->
- checkElement('label:contains("Users")')->
-
- checkElement('a:contains("Cancel")')->
- checkElement('a:contains("Delete")')->
- checkElement('input[type="submit"][value="Save modification"]')->
- end()->
-
- click('Save modification', array('sf_guard_group' => array(
- 'name' => 'user',
- 'description' => 'user group 2',
- 'permissions_list' => array('2'),
- 'users_list' => array('2'),
- )))->
-
- followRedirect()->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'edit')->
- end()->
-
- with('response')->begin()->
- checkElement('li:contains("already exist")', false)->
- end()->
-
-
-
- responseContains('The item was updated successfully.')->
- responseContains('user group 2')
-;
View
40 test/functional/fe/idProjectUserGroupFilterTest.php
@@ -1,40 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
-get('/')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Groups')->
- get('/en/sfGuardGroup')->
-
- responseContains('admin')->
- responseContains('user')->
-
- click('Filter', array('sf_guard_group_filters' =>
- array( 'name' =>
- array(
- 'text' => 'user'
- )
- )
- )
- )->
-
- followRedirect()->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'index')->
- end()->
-
- with('response')->begin()->
- checkElement('table a:contains("admin")', false)->
- checkElement('table a:contains("user")')->
- end();
View
60 test/functional/fe/idProjectUserGroupViewTest.php
@@ -1,60 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
-get('/')->
-click('Login', array('signin' => array('username' => 'user', 'password' => 'user')))->
-followRedirect()->
-
-get('/en/sfGuardGroup')->
- with('response')->begin()->
- isStatusCode(403)->
- end()->
-
-click('Logout')->
-
- get('/en/sfGuardGroup')->
- with('response')->begin()->
- isStatusCode(401)->
- end()->
-
- click('Signin')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Groups')->
- get('/en/sfGuardGroup')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardGroup')->
- isParameter('action', 'index')->
- end()->
-
- with('response')->begin()->
- isStatusCode(200)->
-
- checkElement('div#block-tables div.content h2', 'Groups list')->
-
- checkElement('#block-tables table.table th a[href="/index.php/en/sfGuardGroup?sort=name&sort_type=asc"]', 'Name')->
- checkElement('#block-tables table.table th a[href="/index.php/en/sfGuardGroup?sort=description&sort_type=asc"]',"Description")->
- checkElement('#block-tables table.table tr th:contains("Actions")')->
-
- checkElement('input[type="text"][id="sf_guard_group_filters_name"]')->
- checkElement('input[type="text"][id="sf_guard_group_filters_description"]')->
-
- checkElement('input[type="submit"][value="Filter"]')->
-
- checkElement('th a:contains("Created at")', false)->
- checkElement('th a:contains("Updated at")', false)->
- checkElement('label:contains("Created at")', false)->
- checkElement('label:contains("Updated at")', false)->
- checkElement('label:contains("Groups list")', false)->
- checkElement('label:contains("Users list")', false)->
-
-end();
View
40 test/functional/fe/idProjectUserPermissionCreateTest.php
@@ -1,40 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
- get('/en/sfGuardPermission')->
- click('Signin')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Permissions')->
- get('/en/sfGuardPermission')->
-
- click('Create new permission')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'new')->
- end()->
-
- click('Save', array('sf_guard_permission' => array(
- 'name' => 'new permission',
- 'description' => 'permission for new people',
- 'groups_list' => array('2'=>'user'),
- 'users_list' => array('2'=>'user'),
- )))->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'create')->
- end()->
-
- responseContains('new permission')->
- responseContains('permission for new people')
-;
View
60 test/functional/fe/idProjectUserPermissionEditTest.php
@@ -1,60 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
- get('/en/sfGuardPermission')->
- click('Signin')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Permissions')->
- get('/en/sfGuardPermission')->
-
- click('user')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'edit')->
- end()->
-
- with('response')->begin()->
- isStatusCode(200)->
-
- checkElement('label:contains("Id")', false)->
- checkElement('label:contains("Name")')->
- checkElement('label:contains("Description")')->
- checkElement('label:contains("Groups")')->
- checkElement('label:contains("Users")')->
-
- checkElement('a:contains("Cancel")')->
- checkElement('a:contains("Delete")')->
- checkElement('input[type="submit"][value="Save modification"]')->
- end()->
-
- click('Save modification', array('sf_guard_permission' => array(
- 'name' => 'user',
- 'description' => 'user permission 2',
- 'groups_list' => array('2'),
- 'users_list' => array('2'),
- )))->
-
- followRedirect()->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'edit')->
- end()->
-
- with('response')->begin()->
- checkElement('li:contains("already exist")', false)->
- end()->
-
- responseContains('The item was updated successfully.')->
- responseContains('user permission 2')
-;
View
40 test/functional/fe/idProjectUserPermissionFilterTest.php
@@ -1,40 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
-get('/')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Permissions')->
- get('/en/sfGuardPermission')->
-
- responseContains('admin')->
- responseContains('user')->
-
- click('Filter', array('sf_guard_permission_filters' =>
- array( 'name' =>
- array(
- 'text' => 'user'
- )
- )
- )
- )->
-
- followRedirect()->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'index')->
- end()->
-
- with('response')->begin()->
- checkElement('table a:contains("admin")', false)->
- checkElement('table a:contains("user")')->
- end();
View
59 test/functional/fe/idProjectUserPermissionViewTest.php
@@ -1,59 +0,0 @@
-<?php
-
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
-
-get('/')->
-click('Login', array('signin' => array('username' => 'user', 'password' => 'user')))->
-followRedirect()->
-get('/en/sfGuardPermission')->
- with('response')->begin()->
- isStatusCode(403)->
- end()->
-
-click('Logout')->
-
- get('/en/sfGuardPermission')->
- with('response')->begin()->
- isStatusCode(401)->
- end()->
-
- click('Signin')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Permissions')->
- get('/en/sfGuardPermission')->
-
- with('request')->begin()->
- isParameter('module', 'sfGuardPermission')->
- isParameter('action', 'index')->
- end()->
-
- with('response')->begin()->
- isStatusCode(200)->
-
- checkElement('div#block-tables div.content h2', 'Permissions list')->
-
- checkElement('#block-tables table.table th a[href="/index.php/en/sfGuardPermission?sort=name&sort_type=asc"]', 'Name')->
- checkElement('#block-tables table.table th a[href="/index.php/en/sfGuardPermission?sort=description&sort_type=asc"]',"Description")->
- checkElement('#block-tables table.table tr th:contains("Actions")')->
-
- checkElement('input[type="text"][id="sf_guard_permission_filters_name"]')->
- checkElement('input[type="text"][id="sf_guard_permission_filters_description"]')->
-
- checkElement('input[type="submit"][value="Filter"]')->
-
- checkElement('th a:contains("Created at")', false)->
- checkElement('th a:contains("Updated at")', false)->
- checkElement('label:contains("Created at")', false)->
- checkElement('label:contains("Updated at")', false)->
- checkElement('label:contains("Groups list")', false)->
- checkElement('label:contains("Users list")', false)->
-
-end();
View
23 test/functional/fe/sfGuardGroupSubNavigationMenuTest.php
@@ -1,23 +0,0 @@
-<?php
-include(dirname(__FILE__).'/../../bootstrap/functional.php');
-
-$browser = new idDoctrineTestFunctional(new sfBrowser());
-$browser->initializeDatabase();
-
-
-$browser->
- get('/en/sfGuardGroup')->
- click('Signin')->
- click('Login', array('signin' => array('username' => 'admin', 'password' => 'admin')))->
- followRedirect()->
-
- //click('Groups')->
- get('/en/sfGuardGroup')->