Skip to content

Commit

Permalink
moderation: added empty actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and ntarocco committed Aug 9, 2023
1 parent 28efadb commit 7853bdf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions invenio_rdm_records/requests/user_moderation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 CERN.
#
# Invenio-RDM is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""User moderation actions specific to RDM-Records."""

from .actions import on_block, on_restore

__all__ = ("on_block", "on_restore")
17 changes: 17 additions & 0 deletions invenio_rdm_records/requests/user_moderation/actions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 CERN.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""RDM user moderation action."""


def on_block(user_id, uow=None, **kwargs):
"""Removes records that belong to a user."""
pass


def on_restore(user_id, uow=None, **kwargs):
"""Restores records that belong to a user."""
pass
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ invenio_assets.webpack =
invenio_rdm_records = invenio_rdm_records.webpack:theme
invenio_oauth2server.scopes =
tokens_generate_scope = invenio_rdm_records.tokens.scopes:tokens_generate_scope
invenio_users_resources.moderation.actions =
block = invenio_rdm_records.requests.user_moderation.actions:on_block
restore = invenio_rdm_records.requests.user_moderation.actions:on_restore

[build_sphinx]
source-dir = docs/
Expand Down

0 comments on commit 7853bdf

Please sign in to comment.