-
Notifications
You must be signed in to change notification settings - Fork 31
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
resources: added management endpoints. #103
Conversation
dd0d990
to
37d5f07
Compare
@@ -78,3 +82,39 @@ def avatar(self): | |||
last_modified=avatar.last_modified, | |||
max_age=avatar.max_age, | |||
) | |||
|
|||
@request_view_args |
There was a problem hiding this comment.
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_): |
There was a problem hiding this comment.
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.
closes inveniosoftware/invenio-requests#344
We decided to add the endpoints in this deliverable since it was a minor effort for now.