Author: bshaffer
Date: 2010-02-13 21:03:07 +0100 (Sat, 13 Feb 2010)
New Revision: 28012
Modified:
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppGroupSecurityTask.class.php
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppUserSecurityTask.class.php
Log:
adds ability to filter by module for user/group security tasks
Modified:
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppGroupSecurityTask.class.php
===================================================================
---
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppGroupSecurityTask.class.php
2010-02-13 17:27:47 UTC (rev 28011)
+++
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppGroupSecurityTask.class.php
2010-02-13 20:03:07 UTC (rev 28012)
@@ -7,6 +7,7 @@
$this->addArguments(array(
new sfCommandArgument('application', sfCommandArgument::REQUIRED,
'The application'),
new sfCommandArgument('group', sfCommandArgument::OPTIONAL, 'The
name of a group to check'),
+ new sfCommandArgument('module', sfCommandArgument::OPTIONAL,
'Display for a particular module'),
));
$this->addOptions(array(
@@ -103,8 +104,11 @@
$count = 0;
foreach ($security as $i => $item)
{
- $this->log(sprintf($item['has_access'] ? $formatRow1:$formatRow2,
$this->formatter->format($count == 0 ? $group : '',$this->labelFormat),
$item['module'], $item['action'], $item['has_access_string'],
$item['credential_string']));
- $count++;
+ if (!$arguments['module'] || $arguments['module'] == $item['module'])
+ {
+ $this->log(sprintf($item['has_access'] ? $formatRow1:$formatRow2,
$this->formatter->format($count == 0 ? $group : '',$this->labelFormat),
$item['module'], $item['action'], $item['has_access_string'],
$item['credential_string']));
+ $count++;
+ }
}
}
}
Modified:
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppUserSecurityTask.class.php
===================================================================
---
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppUserSecurityTask.class.php
2010-02-13 17:27:47 UTC (rev 28011)
+++
plugins/csSecurityTaskExtraPlugin/branches/1.3/lib/task/sfAppUserSecurityTask.class.php
2010-02-13 20:03:07 UTC (rev 28012)
@@ -7,6 +7,7 @@
$this->addArguments(array(
new sfCommandArgument('application', sfCommandArgument::REQUIRED,
'The application'),
new sfCommandArgument('user', sfCommandArgument::OPTIONAL, 'The id
or username of a user to check'),
+ new sfCommandArgument('module', sfCommandArgument::OPTIONAL,
'Display for a particular module'),
));
$this->addOptions(array(
@@ -104,8 +105,11 @@
$count = 0;
foreach ($security as $i => $item)
{
- $this->log(sprintf($item['has_access'] ? $formatRow1:$formatRow2,
$this->formatter->format($count == 0 ? $name:'', $this->labelFormat),
$item['module'], $item['action'], $item['has_access_string'],
$item['credential_string']));
- $count++;
+ if (!$arguments['module'] || $arguments['module'] == $item['module'])
+ {
+ $this->log(sprintf($item['has_access'] ? $formatRow1:$formatRow2,
$this->formatter->format($count == 0 ? $name:'', $this->labelFormat),
$item['module'], $item['action'], $item['has_access_string'],
$item['credential_string']));
+ $count++;
+ }
}
}
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.