Skip to content

Conversation

@sakshamarora1
Copy link
Contributor

@sakshamarora1 sakshamarora1 commented Nov 24, 2025

closes: #498

@sakshamarora1 sakshamarora1 force-pushed the feature/locking_requests branch from d7c6467 to b4823e1 Compare November 25, 2025 14:51
@sakshamarora1 sakshamarora1 force-pushed the feature/locking_requests branch from b4823e1 to f6dff91 Compare November 26, 2025 10:00
def update(self, identity, data=None, record=None, uow=None, **kwargs):
"""Update the reviewers of a request."""
if "reviewers" in data:
if data.get("reviewers", None):
Copy link
Member

Choose a reason for hiding this comment

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

This should not change because it adds a regression when we remove reviewers

"""Condition to choose generators set."""
# If the event type is a log event, we don't need to check if the request is locked
# Because it's not a comment event and we don't want to block logs
if event_type and event_type == LogEventType:
Copy link
Member

Choose a reason for hiding this comment

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

I find this odd here and I know that it comes from the fact that the events_service.create assumes permission based on adding comments and not log events. Isnt it better to change the check of permission on the service method to explicitely check the event.type and apply correct permissions? @slint wdyt?

@sakshamarora1 sakshamarora1 force-pushed the feature/locking_requests branch from d4d0947 to 52716be Compare December 2, 2025 09:55
self.require_permission(identity, "lock_request", request=request._record)

if request.data["is_locked"]:
raise RequestLockedError(description="The request is already locked.")
Copy link
Member

Choose a reason for hiding this comment

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

translations?

self.require_permission(identity, "lock_request", request=request._record)

if not request.data["is_locked"]:
raise RequestLockedError(description="The request is already unlocked.")
Copy link
Member

Choose a reason for hiding this comment

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

translations?

@sakshamarora1 sakshamarora1 force-pushed the feature/locking_requests branch 3 times, most recently from d1d10b9 to e033375 Compare December 5, 2025 08:45
@sakshamarora1 sakshamarora1 force-pushed the feature/locking_requests branch from e033375 to 35e0200 Compare December 5, 2025 10:24
@zzacharo zzacharo merged commit c3be4f8 into inveniosoftware:master Dec 5, 2025
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.

Apply a grace period for comment actions (Lock discussion - comment actions)

2 participants