Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

Commit

Permalink
Merge branch 'release-2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasLiampotis committed Jan 25, 2021
2 parents 55cd885 + 7f7a7ce commit 90e5101
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v2.0.3] - 2021-01-25

### Fixed

- Namespace errors

## [v2.0.2] - 2021-01-25

### Added
Expand Down
3 changes: 2 additions & 1 deletion lib/Attributes/SshPublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace SimpleSAML\Module\attrauthcomanage\Attributes;

use PDO;
use SimpleSAML\Database;
use SimpleSAML\Error;
use SimpleSAML\Logger;

Expand Down Expand Up @@ -84,4 +85,4 @@ public static function getSshPublicKeyType($key)
{
return self::$SSH_PUBLIC_KEY_TYPE[$key];
}
}
}
16 changes: 8 additions & 8 deletions lib/Auth/Process/COmanageDbClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function __construct($config, $reserved)

// Get a copy of the default Roles before enriching with COmanage roles
// TODO: Move this out configuration check. Make this as part of voRoles multitenacy support
$voRolesObject = new ArrayObject($config['voRoles']);
$voRolesObject = new \ArrayObject($config['voRoles']);
$this->voRolesDef = $voRolesObject->getArrayCopy();
}

Expand Down Expand Up @@ -517,18 +517,18 @@ private function isIdpIdentExpired($idpIdent, $identsList)
if( $ident['identifier'] === $idpIdent) {
Logger::debug("[attrauthcomanage] isIdpIdentExpired: org_valid_through = " . var_export($ident['org_valid_through'], true));
Logger::debug("[attrauthcomanage] isIdpIdentExpired: org_valid_from = " . var_export($ident['org_valid_from'], true));
$current_date = new DateTime('now', new DateTimeZone('Etc/UTC'));
$current_date = new \DateTime('now', new \DateTimeZone('Etc/UTC'));
if (empty($ident['org_valid_from']) && empty($ident['org_valid_through'])) {
return false;
} elseif (empty($ident['org_valid_from']) && !empty($ident['org_valid_through'])) {
$valid_through = new DateTime($ident['org_valid_through'], new DateTimeZone('Etc/UTC'));
$valid_through = new \DateTime($ident['org_valid_through'], new \DateTimeZone('Etc/UTC'));
return !($valid_through >= $current_date);
} elseif (!empty($ident['org_valid_from']) && empty($ident['org_valid_through'])) {
$valid_from = new DateTime($ident['org_valid_from'], new DateTimeZone('Etc/UTC'));
$valid_from = new \DateTime($ident['org_valid_from'], new \DateTimeZone('Etc/UTC'));
return !($current_date >= $valid_from);
} elseif (!empty($ident['org_valid_from']) && !empty($ident['org_valid_through'])) {
$valid_from = new DateTime($ident['org_valid_from'], new DateTimeZone('Etc/UTC'));
$valid_through = new DateTime($ident['org_valid_through'], new DateTimeZone('Etc/UTC'));
$valid_from = new \DateTime($ident['org_valid_from'], new \DateTimeZone('Etc/UTC'));
$valid_through = new \DateTime($ident['org_valid_through'], new \DateTimeZone('Etc/UTC'));
if ($valid_through >= $current_date
&& $current_date > $valid_from) {
return false;
Expand Down Expand Up @@ -1158,7 +1158,7 @@ private function retrieveCOPersonData(&$state)
// Get SSH Public Key information
if($this->retrieveSshKeys) {
Logger::debug("[attrauthcomanage] retrieveCOPersonData: sshPublicKeys.");
$attrSshPublicKey = new SshPublicKey();
$attrSshPublicKey = new Attributes\SshPublicKey();
$sshPublicKeys = $attrSshPublicKey->getSshPublicKeys($basicInfo['id']);
foreach($sshPublicKeys as $sshKey) {
if(!empty($sshKey['skey']) && !empty($sshKey['type'])) {
Expand Down Expand Up @@ -1578,7 +1578,7 @@ private function getTermsAgreementRevisioned($personId)
. var_export($personId, true));

$result = [];
$db = SimpleSAML\Database::getInstance();
$db = Database::getInstance();
$queryParams = [
'coPersonId' => [$personId, PDO::PARAM_INT],
];
Expand Down

0 comments on commit 90e5101

Please sign in to comment.