Skip to content

Commit

Permalink
update code with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-bellenghi committed Sep 6, 2024
1 parent 1acc45c commit 670163b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/design/plone/contenttypes/restapi/serializers/dxfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ def __call__(self):
match = RESOLVEUID_RE.match(path)
if match:
uid, suffix = match.groups()
# We made this check 'cause DTD asks to avoid an unauthorized page,
# just for the "unauthorized" label on it. If the user is anonymous,
# we redirect him to the login page; /login has a more friendly message
if api.user.is_anonymous():
target = uuidToObject(uid, unrestricted=True)
value = target.absolute_url()
Expand Down

0 comments on commit 670163b

Please sign in to comment.