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

requests: added moderation actions. #991

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions invenio_communities/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-communities is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Communities user moderation."""

from .actions import remove_communities, restore_communities

__all__ = ("remove_communities", "restore_communities")
17 changes: 17 additions & 0 deletions invenio_communities/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-communities is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Communities user moderation actions."""


def remove_communities(user_id, **kwargs):
"""Removes communities that belong to a user."""
pass


def restore_communities(user_id, **kwargs):
"""Restores communities 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 @@ -87,6 +87,9 @@ invenio_i18n.translations =
invenio_administration.views =
invenio_communities_list = invenio_communities.administration.communities:CommunityListView
invenio_communities_details = invenio_communities.administration.communities:CommunityDetailView
invenio_users_resources.moderation.actions =
block = invenio_communities.requests.user_moderation.actions:remove_communities
restore = invenio_communities.requests.user_moderation.actions:restore_communities

[build_sphinx]
source-dir = docs/
Expand Down
Loading