Skip to content

Conversation

@MarcosSpessatto
Copy link
Contributor

Closes #15138

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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants