Skip to content

Draft: Add spec coverage on work item and issues permissions

What does this MR do and why?

Define a TeamA group. The sole intention of this is to be shared into groups, projects and eventually project namespaces under various roles so that we can cover the group sharing aspect of permissions. There will probably need to be a deeper level of sharing as well. E.g. TeamA is shared into TeamB which is shared into TeamC which is then shared into some group with work items, but we can start with just one level of sharing for now.

graph TD;
  TeamA --> Guest((Guest));
  TeamA --> Reporter((Reporter));
  TeamA --> Developer((Developer));
  TeamA --> Maintainer((Maintainer));
  TeamA --> Owner((Owner));

We can test most of the permissions scenarios in a namespaces hierarchy with a 3 level deep, so that we can test the permission in current level, the direct parent or at a skip level, similar for descendants.

Having that this is the namespaces hierarchy that I am suggesting to use:

flowchart TD;
  GroupA{{GroupA}} --> ProjectA;
  GroupA --> ProjectANamespace;
  ProjectA <--> ProjectANamespace(ProjectANamespace)

  GroupA{{GroupA}} --> GroupB{{GroupB}};
  GroupB --> ProjectB;
  GroupB --> ProjectBNamespace(ProjectBNamespace);
  ProjectB <--> ProjectBNamespace

  GroupB{{GroupB}} --> GroupC{{GroupC}};
  GroupC --> ProjectC;
  GroupC --> ProjectCNamespace(ProjectCNamespace);
  ProjectC <--> ProjectCNamespace

  GroupA{{GroupA}} --> GroupD{{GroupD}};
  GroupD --> ProjectD;
  GroupD --> ProjectDNamespace(ProjectDNamespace);
  ProjectD <--> ProjectDNamespace

  GroupD{{GroupD}} --> GroupE{{GroupE}};
  GroupE --> ProjectE;
  GroupE --> ProjectENamespace(ProjectENamespace);
  ProjectE <--> ProjectENamespace

  User((User)) -- as--> Roles{"guest<br>reporter</br>developer<br>maintainer</br>owner"} 
  Roles -...-> GroupA
  Roles -...-> GroupB
  Roles -...-> GroupC
  Roles -...-> GroupD
  Roles -...-> GroupE
  Roles -...-> ProjectA
  Roles -...-> ProjectB
  Roles -...-> ProjectC
  Roles -...-> ProjectD
  Roles -...-> ProjectE
  Roles -...-> ProjectANamespace
  Roles -...-> ProjectBNamespace
  Roles -...-> ProjectCNamespace
  Roles -...-> ProjectDNamespace
  Roles -...-> ProjectENamespace

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Alexandru Croitor

Merge request reports