You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 theIfPolicyClosed
generator to search for the fields inrecord.access
if the record has anaccess
attribute,record.get("access")
otherwiseThat 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.
The text was updated successfully, but these errors were encountered: