Skip to content

Draft: Add new static role Planner

Eugenia Grieff requested to merge 482733-add-planner-role into master

What does this MR do and why?

This MR adds a new static role called Planner including Product Manager abilities. See #482733 for more details.

The changes included in this MR consist of:

  • Populate role in drop-downs for invite and membership pages
  • Display role as pills on component views
  • Define methods in Group and Project models that allow fetching and adding members with the Planner role
  • Add group and project policies. these are based on the permission table outline in &15645

To note

Although the Planner role includes all policies allowed for the Guest role, we can't consider permissions to be linear anymore because the Reporter role doesn't inherit from the Planner role. The following tables outline the differences with the Reporter, Developer and Maintainer roles

Group Permissions

Permissions that are allowed for Planners and forbidden for Reporters:
Create/edit/delete group wiki pages
Create projects in group
Edit epic comments (posted by any user)
Delete group epic
Permissions that are allowed for Planners and forbidden for Developers
Delete group epic
Permissions that are allowed for Planners and forbidden for Maintainers
Delete group epic

Project Permissions

Permissions that are allowed for Planners and forbidden for Reporters:
Issues: Upload/archive Design Management files
Issue and Tasks: Delete
Projects: Create/edit/delete wiki pages
Permissions that are allowed for Planners and forbidden for Developers
Issue and Tasks: Delete

FAQ

  • Could we use a feature flag? This is, unfortunately, not possible since the roles are defined at boot time (as class-level methods), and feature flags cannot be used there. See https://gitlab.com/gitlab-org/gitlab/-/issues/461064#note_2042737725
  • Could the MR be broken down into several MRs? Given that the role will not be hidden, it will have to include all abilities from the let-go. I discussed with Product the option of releasing the role matching the Guest role permissions (and incrementally adding the additional abilities), but it was deemed not ideal.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Actions Scheenshot/Screen recording
  • Invite a user with the Planner role to a Group or Project
  • Change the role of an existing member to Planner

Screen_Recording_2024-10-24_at_14.15.45

  • A Planner user adds a comment

Screenshot_2024-10-24_at_14.18.43

How to set up and validate locally

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

Edited by Eugenia Grieff

Merge request reports

Loading