Skip to content

Commit

Permalink
config: add subcommunity invitation request notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Nov 21, 2024
1 parent e17aff0 commit dc2bf94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions invenio_app_rdm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,11 @@ def github_link_render(record):
community_notifications.SubCommunityCreate.type: community_notifications.SubCommunityCreate,
community_notifications.SubCommunityAccept.type: community_notifications.SubCommunityAccept,
community_notifications.SubCommunityDecline.type: community_notifications.SubCommunityDecline,
# Subcommunity invitation request
community_notifications.SubComInvitationCreate.type: community_notifications.SubComInvitationCreate,
community_notifications.SubComInvitationAccept.type: community_notifications.SubComInvitationAccept,
community_notifications.SubComInvitationDecline.type: community_notifications.SubComInvitationDecline,
community_notifications.SubComInvitationExpire.type: community_notifications.SubComInvitationExpire,
}
"""Notification builders."""

Expand Down
6 changes: 4 additions & 2 deletions invenio_app_rdm/requests_ui/views/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from invenio_communities.members.services.request import CommunityInvitation
from invenio_communities.proxies import current_identities_cache
from invenio_communities.subcommunities.services.request import (
SubCommunityRequest,
SubCommunityInvitationRequest,
SubCommunityRequest,
)
from invenio_communities.utils import identity_cache_key
from invenio_communities.views.communities import render_community_theme_template
Expand Down Expand Up @@ -245,7 +245,9 @@ def community_dashboard_request_view(request, community, community_ui, **kwargs)
is_record_inclusion = request_type == CommunityInclusion.type_id
is_member_invitation = request_type == CommunityInvitation.type_id
is_subcommunity_request = request_type == SubCommunityRequest.type_id
is_subcommunity_invitation_request = request_type == SubCommunityInvitationRequest.type_id
is_subcommunity_invitation_request = (
request_type == SubCommunityInvitationRequest.type_id
)
request_is_accepted = request["status"] == AcceptAction.status_to

permissions = community.has_permissions_to(
Expand Down

0 comments on commit dc2bf94

Please sign in to comment.