Commit b70f8768 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Authorize special characters in registrationNumber

parent 85922f12
......@@ -344,20 +344,6 @@ class organization
return $this->sdoFactory->find("organization/orgContact", "orgId = '$orgId'");
}
/**
* Check if an organization has a given role
* @param string $registrationNumber The organization identifier
* @param string $role The role
*
* @return boolean The result of the operation
*/
public function hasRole($registrationNumber, $role)
{
$organization = $this->sdoFactory->find('organization/organization', "registrationNumber = '$registrationNumber' AND orgRoleCodes = '*$role*'");
return (bool) count($organization);
}
/**
* Update an organization
* @param string $orgId The organization identifier
......
......@@ -94,7 +94,6 @@ class organization
/**
* The registration number
*
* @pattern #^[A-Za-z0-9_]*$#
* @var string
* @notempty
*/
......
......@@ -84,7 +84,7 @@ interface organizationInterface
*
* @action organization/organization/getOrgByRegNumber
*/
public function readByregnumber_registrationNumber_();
public function readByregnumber($registrationNumber);
/**
* Get organizations by role
......@@ -190,15 +190,6 @@ interface organizationInterface
*/
public function readServicepositions_orgId_();
/**
* Check if an organization has a given role
*
* @return boolean The result of the operation
*
* @action organization/organization/hasRole
*/
public function readHasrole_registrationNumber__role_();
/**
* Update an organization
* @param organization/organization $organization The organization object to update
......
......@@ -154,7 +154,7 @@ class welcome
$acceptUserIndex = true;
// Archive
$originatorOrg = \laabs::callService('organization/organization/readByregnumber_registrationNumber_', $archive->originatorOrgRegNumber);
$originatorOrg = \laabs::callService('organization/organization/readByregnumber', $archive->originatorOrgRegNumber);
$archive->originatorOrgName = $originatorOrg->displayName;
$archive->depositDate = $archive->depositDate->format('Y-m-d H:i:s');
......
......@@ -987,7 +987,7 @@ msgstr "Lecture de toutes les unités organisationnelles"
msgid "organization/organization/read_orgId_"
msgstr "Lecture d'une organisation"
msgid "organization/organization/readByregnumber_registrationNumber_"
msgid "organization/organization/readByregnumber"
msgstr "Lecture d'une organisation en fonction de son numéro d'immatriculation"
msgid "organization/organization/readByrole_role_"
......@@ -1020,9 +1020,6 @@ msgstr "Suppression d'un contact d'une organisation"
msgid "organization/organization/readServicepositions_orgId_"
msgstr "Lecture d'une organisation en fonction d'une position d'un service"
msgid "organization/organization/readHasrole_registrationNumber__role_"
msgstr "Vérification qu'une organisation possède un rôle"
msgid "organization/organization/update_orgId_"
msgstr "Modification d'une organisation"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment