Skip to content

[FIX] REST API to return only public custom fields - #15292

Merged
sampaiodiego merged 2 commits into
developfrom
fix-rest-custom-fields
Sep 18, 2019
Merged

sampaiodiego merged 2 commits into
developfrom
fix-rest-custom-fields

Conversation

@MarcosSpessatto

Copy link
Copy Markdown
Contributor

Closes #15138

Comment thread app/api/server/api.js Outdated
const nonPublicCustomFields = Object.keys(customFields).filter((customFieldKey) => customFields[customFieldKey].public !== true);
API.v1.setLimitedCustomFields(nonPublicCustomFields);
} catch (error) {
logger.warn('Invalid Custom Fields', error);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.warn('Invalid Custom Fields', error);

I don't see a reason to show the warn message twice, so leaving only the console.warn below I think is enough

@sampaiodiego sampaiodiego changed the title Fix rest API to show only public custom fields [FIX] REST API to return only public custom fields Sep 18, 2019
@sampaiodiego
sampaiodiego merged commit f2f73af into develop Sep 18, 2019
@sampaiodiego
sampaiodiego deleted the fix-rest-custom-fields branch September 18, 2019 19:48
@sampaiodiego sampaiodiego mentioned this pull request Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

non-admin users can't see custom fields in users.list

2 participants