Skip to content

AO3-7050 Restrict ability to send invitation to email address - #5973

Open
Bilka2 wants to merge 1 commit into
otwcode:masterfrom
Bilka2:AO3-7050-restrict-ability-to-send-invite-to-email-address
Open

AO3-7050 Restrict ability to send invitation to email address#5973
Bilka2 wants to merge 1 commit into
otwcode:masterfrom
Bilka2:AO3-7050-restrict-ability-to-send-invite-to-email-address

Conversation

@Bilka2

@Bilka2 Bilka2 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Issue

https://otwarchive.atlassian.net/browse/AO3-7050

Purpose

Restrict access to AdminInvitationsController create and index to the correct admin roles. I also did some cleanup of the controller.

References

PR limit does not apply to volunteers with write access to the repository.

Credit

Bilka

@sarken sarken left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one thought, otherwise looks good!

<% end %>
</ul>
</li>
<% if policy(Invitation).index? %>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm. I'm not sure about this. It works with the current state of things, but it feels a little too easy to accidentally prevent a role who needs this menu from accessing it. For example, if we take support out of CREATE_ROLES and FIND_ROLES in the Invitations policy, they'll no longer be able to access the "Manage Requests" link. If we add board_assistants_team to the PERMITTED_ROLES for the UserInviteRequest policy, they won't be able to get to the "Manage Queue" link. It's not catastrophic, but it would be annoying.

<% if policy(Invitation).index? || policy(UserInviteRequest).index? || policy(InviteRequest).can_manage? %> might be bette. If that feels like overkill, we could add a comment to each of the policies telling us to check this menu if we change anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants