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

permissions: evaluate solution for using generators in serializers #904

Open
zzacharo opened this issue Feb 24, 2023 · 0 comments
Open

permissions: evaluate solution for using generators in serializers #904

zzacharo opened this issue Feb 24, 2023 · 0 comments

Comments

@zzacharo
Copy link
Member

In the context of serializers, one has access only to the dictionary of data e.g community result item dict. That causes some troubles with permission generators that assume class instance attributes e.g community.access systemfield.

Recently, to implement the permission check in the UICommunitySerializer, see _community_permission_check we changed the IfPolicyClosed generator to search for the fields in

  • record.access if the record has an access attribute,
  • record.get("access") otherwise

That solution seems not ideal and we should evaluate if this the way to go thus normalize also the other places where the same problem occurs or find a more elegant solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant