Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit a18fad6

Browse files
authored
fix(forceaup): drop unused option uidAttr (#215)
configuration option was required but not used closes #157
1 parent 9a676e1 commit a18fad6

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

config-templates/processFilterConfigurations-example.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ Example how to enable filter ForceAup:
133133
'filterSPs' => $perunEntityIds,
134134
'config' => [
135135
'class' => 'perun:ForceAup',
136-
'uidAttr' => 'uid',
137136
'interface' => 'rpc',
138137
'perunAupsAttr' => 'urn:perun:entityless:attribute-def:def:orgAups',
139138
'perunUserAupAttr' => 'urn:perun:user:attribute-def:def:aups',

lib/Auth/Process/ForceAup.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
*/
3232
class ForceAup extends ProcessingFilter
3333
{
34-
public const UID_ATTR = 'uidAttr';
35-
3634
public const INTERFACE_PROPNAME = 'interface';
3735

3836
public const PERUN_AUPS_ATTR = 'perunAupsAttr';
@@ -47,8 +45,6 @@ class ForceAup extends ProcessingFilter
4745

4846
private const DATETIME_FORMAT = 'Y-m-d';
4947

50-
private $uidAttr;
51-
5248
private $perunAupsAttr;
5349

5450
private $perunUserAupAttr;
@@ -68,9 +64,6 @@ public function __construct($config, $reserved)
6864
{
6965
parent::__construct($config, $reserved);
7066

71-
if (!isset($config[self::UID_ATTR])) {
72-
throw new Exception('perun:ForceAup: missing mandatory configuration option \'' . self::UID_ATTR . '\'.');
73-
}
7467
if (!isset($config[self::PERUN_AUPS_ATTR]) && !isset($config[self::PERUN_VO_AUP_ATTR])) {
7568
throw new Exception(
7669
'perun:ForceAup: missing at least one of mandatory configuration options \'' . self::PERUN_AUPS_ATTR . '\' or \'' . self::PERUN_VO_AUP_ATTR . '\'.'
@@ -85,7 +78,6 @@ public function __construct($config, $reserved)
8578
$config[self::INTERFACE_PROPNAME] = Adapter::RPC;
8679
}
8780

88-
$this->uidAttr = (string) $config[self::UID_ATTR];
8981
$this->perunAupsAttr = isset($config[self::PERUN_AUPS_ATTR]) ?
9082
(string) $config[self::PERUN_AUPS_ATTR] : null;
9183
$this->perunVoAupAttr = isset($config[self::PERUN_VO_AUP_ATTR]) ?
@@ -177,7 +169,6 @@ public function process(&$request)
177169
Logger::debug('perun:ForceAup - NewAups: ' . json_encode($aupsToBeApproved));
178170

179171
if (!empty($aupsToBeApproved)) {
180-
$request[self::UID_ATTR] = $this->uidAttr;
181172
$request[self::PERUN_USER_AUP_ATTR] = $this->perunUserAupAttr;
182173
$request['newAups'] = $aupsToBeApproved;
183174
$id = State::saveState($request, 'perun:forceAup');

0 commit comments

Comments
 (0)