Skip to content

Commit

Permalink
Merge pull request #1812 from dhis2/DHIS2-10464/fix-program-access
Browse files Browse the repository at this point in the history
fix(programs): request publicAccess explicitly
  • Loading branch information
Birkbjo authored Mar 11, 2021
2 parents d01c494 + c8e16ab commit 9ca9a53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EditModel/event-program/epics.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,17 @@ function loadEventProgramMetadataByProgramId(programPayload) {
'notificationTemplates[:owner]',
'programTrackedEntityAttributes',
'user[id,name]',
'publicAccess',
'userGroupAccesses',
'userAccesses'
].join(',');

// Tomcat 8.5 does not allow unencoded brackets in querystrings. By passing the query params
// as an object to d2 it will url encode all params and escape the brackets
const queryParams = {
fields: ':owner,displayName',
'programs:filter': `id:eq:${programId}`,
'programs:fields': `${programFields},programStages[:owner,user[id,name],displayName,attributeValues[:all,attribute[id,name,displayName]],programStageDataElements[:owner,renderType,dataElement[id,displayName,valueType,optionSet,domainType]],notificationTemplates[:owner,displayName],dataEntryForm[:owner],programStageSections[:owner,displayName,dataElements[id,displayName]]]`,
'programs:fields': `${programFields},programStages[:owner, publicAccess, userGroupAccesses, userAccesses, user[id,name],displayName,attributeValues[:all,attribute[id,name,displayName]],programStageDataElements[:owner,renderType,dataElement[id,displayName,valueType,optionSet,domainType]],notificationTemplates[:owner,displayName],dataEntryForm[:owner],programStageSections[:owner,displayName,dataElements[id,displayName]]]`,
'dataElements:fields': 'id,displayName,valueType,optionSet',
'dataElements:filter': 'domainType:eq:TRACKER',
'trackedEntityAttributes:fields': 'id,displayName,valueType,optionSet,unique'
Expand Down

0 comments on commit 9ca9a53

Please sign in to comment.