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

resources: added management endpoints. #103

Merged

Conversation

alejandromumo
Copy link
Member

closes inveniosoftware/invenio-requests#344

We decided to add the endpoints in this deliverable since it was a minor effort for now.

@@ -78,3 +82,39 @@ def avatar(self):
last_modified=avatar.last_modified,
max_age=avatar.max_age,
)

@request_view_args
Copy link
Member Author

Choose a reason for hiding this comment

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

We should add an error handler for lock errors.

This is useful for the caller to know why the moderation failed.

Since locks are not merged yet, I opened the PR without this handler. It can be added later on.

@@ -156,6 +156,17 @@ def commit(self):
self.model.update(data)
return self

@classmethod
def deactivate(cls, id_):
Copy link
Member Author

Choose a reason for hiding this comment

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

Added to invalidate the identity immediately, otherwise the users are deactivated and can still do things in the platform until they're logged off.

@zzacharo zzacharo merged commit 0c198dd into inveniosoftware:master Aug 21, 2023
10 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.

[USER MODERATION] - 5th deliverable - create moderation request on first publish
2 participants