Skip to content

WIP: Add members services to centralize permissions checks

Rémy Coutable requested to merge rc-members-services-based-on-18583 into master

This is based on 18583-implement-access-request-to-project-group-api / !4833 (merged) and is not meant to be merged as-is.


What does this MR do?

Are there points in the code the reviewer needs to double check?

I decided to create new services to centralize the members permission checks since we support those actions at the controller and API levels:

  • Members::RequestAccessService
  • Members::ApproveAccessRequestService

I also created a new finder to find access requests (same idea about centralizing the permission checks):

  • AccessRequestsFinder

To be split in a new MR:

Last but not least, I used Grape DSL to document the API methods and their expected params. Params type and requirements are enforce by Grape directly.

TODO:

  • New Members::Create service

Why was this MR needed?

What are the relevant issue numbers?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

Merge request reports