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 alias fields not showing up in permissions #11685

Merged
merged 1 commit into from
Feb 17, 2022
Merged

Conversation

azrikahar
Copy link
Contributor

Fixes #11683

Bug

With the following data model as example:

image

Alias fields like Notice aren't showing up in Field permissions, hence the admin is unable to grant read permission to the restricted users/roles:

chrome_6VYljD0EQ2

Investigation

#11265 extracted getFieldsForCollectionSorted as a function, but the second .filter() here shouldn't be present as that should only be applicable in use-field-tree to hide groups/aliases from the Filter input.

const fields = this.fields
.filter((field) => field.collection === collection)
.filter(
(field: Field) =>
field.meta?.special?.includes('group') ||
(!field.meta?.special?.includes('alias') && !field.meta?.special?.includes('no-data'))
);

After fix applied

chrome_ota9bTPr8W

@azrikahar azrikahar added this to the v9-next milestone Feb 17, 2022
@azrikahar azrikahar self-assigned this Feb 17, 2022
@rijkvanzanten rijkvanzanten merged commit b748912 into main Feb 17, 2022
@rijkvanzanten rijkvanzanten deleted the issue/11683 branch February 17, 2022 14:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Presentation fields don't work if field permissions are applied
2 participants