Skip to content

fix(get_record_requests): allow anonymous users to access landing page#2363

Merged
utnapischtim merged 1 commit into
inveniosoftware:masterfrom
sakshamarora1:fix/requests_review_permission
Jun 12, 2026
Merged

fix(get_record_requests): allow anonymous users to access landing page#2363
utnapischtim merged 1 commit into
inveniosoftware:masterfrom
sakshamarora1:fix/requests_review_permission

Conversation

@sakshamarora1

Copy link
Copy Markdown
Contributor

No description provided.

@fenekku fenekku left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think keeping the type(identity) == AnonymousIdentity is fine for now mostly because we don't have the bandwidth to investigate the ramifications and original context for that. In the future, it would be nice to verify, because I agree it seems redundant.

self.require_permission(identity, "review", record=record._record)
can_review = self.check_permission(identity, "review", record=record._record)
if not can_review:
# Instead of raising PermissionDeniedError, return an empty dictionary because anonymous users do not have permissions to search requests

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: I would have thought the linter would flag those

Suggested change
# Instead of raising PermissionDeniedError, return an empty dictionary because anonymous users do not have permissions to search requests
# Instead of raising PermissionDeniedError, return an empty
# dictionary because anonymous users do not have permissions to
# search requests

@utnapischtim utnapischtim merged commit 2f5090c into inveniosoftware:master Jun 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants