Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 18, 2019

Conversation

MarcosSpessatto
Copy link
Member

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