Don't encode the uri parameter of /api/authz/authorizations/search/object since the returned self link doesn't encode the uri param

(cherry picked from commit b0991db1d4)
This commit is contained in:
Alexandre Vryghem
2024-05-15 00:06:07 +02:00
committed by github-actions[bot]
parent 8ea7a2572a
commit e0fb590b02
2 changed files with 3 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ describe('AuthorizationDataService', () => {
const ePersonUuid = 'fake-eperson-uuid'; const ePersonUuid = 'fake-eperson-uuid';
function createExpected(providedObjectUrl: string, providedEPersonUuid?: string, providedFeatureId?: FeatureID): FindListOptions { function createExpected(providedObjectUrl: string, providedEPersonUuid?: string, providedFeatureId?: FeatureID): FindListOptions {
const searchParams = [new RequestParam('uri', providedObjectUrl)]; const searchParams = [new RequestParam('uri', providedObjectUrl, false)];
if (hasValue(providedFeatureId)) { if (hasValue(providedFeatureId)) {
searchParams.push(new RequestParam('feature', providedFeatureId)); searchParams.push(new RequestParam('feature', providedFeatureId));
} }

View File

@@ -132,7 +132,8 @@ export class AuthorizationDataService extends BaseDataService<Authorization> imp
if (isNotEmpty(options.searchParams)) { if (isNotEmpty(options.searchParams)) {
params = [...options.searchParams]; params = [...options.searchParams];
} }
params.push(new RequestParam('uri', objectUrl)); // TODO fix encode the uri parameter in the self link in the backend and set encodeValue to true afterwards
params.push(new RequestParam('uri', objectUrl, false));
if (hasValue(featureId)) { if (hasValue(featureId)) {
params.push(new RequestParam('feature', featureId)); params.push(new RequestParam('feature', featureId));
} }