Skip to content

Draft: Update external user group and project policy

Serena Fang requested to merge sfang-external-user-policy into master

What does this MR do?

#13515 (closed)

From the documentation, external users should not be able to create projects, subgroups, snippets, or fork projects. Previously, these rules weren't being applied, and external users still got the full permissions of the role they were added as. This MR enforces policies so that external users no longer have permission to create projects, subgroups, snippets, and fork projects.

Screenshots (strongly suggested)

Before:

When impersonating an external user with maintainer permission, I have the ability to create projects, subgroups, and snippets in a group I am in.

  • "New subgroup" and "New project" buttons appear in top right:
  • Clicking "New project" does indeed create a new project:
  • Clicking "New subgroup" does indeed create a new subgroup:
  • "New snippet" button appears:
  • Clicking "New snippet" does indeed create a new snippet:
  • Creating a snippet works in both projects within a group and in personal namespaces:
  • "Fork project" option appears:
  • Clicking "Fork" does indeed fork the project:

After:

Still impersonating the external user.

  • "New project" and "New subgroup" buttons no longer appear:
  • "Create blank project" option still appears in dropdown, but attempting to create a project gives an error:

image

  • Attempting to create a subgroup with http://127.0.0.1:3000/groups/new?parent_id=107 gives a 404:

  • I can still view snippets, but cannot create them:

image

  • Attempting to create a snippet with http://127.0.0.1:3000/external/external-project/-/snippets/new gives a 404.

  • "Fork project" button no longer appears:

image

  • Attempting to fork a project with http://127.0.0.1:3000/tajuana/Flight/-/forks/new gives a 404

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Serena Fang

Merge request reports

Loading