Skip to content
GitLab Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,136
    • Issues 43,136
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,363
    • Merge requests 1,363
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 has launched! Please visit Breaking changes in 15.0 and 15.0 Removals to see which breaking changes may impact your workflow.

  • GitLab.org
  • GitLabGitLab
  • Issues
  • #216987
Closed
Open
Created May 07, 2020 by Melissa Ushakov@mushakovDeveloper2 of 2 tasks completed2/2 tasks

Prevent forking outside a group

Problem to solve

Customers with intellectual property want to prevent their data from leaking. We built a feature to prevent forking outside a group that can be used with GMA. Customers want to be able to take advantage of this functionality in any group.

Intended users

User experience goal

Groups owners feel confident that their intellectual property is safe. Group members receive clear explanations about why they can't fork. There is a clear alternative path for them to follow to do their work.

Proposal

For groups, a group Owner should be able to toggle whether or not forks can be created outside of the group in the top level group. The setting should be inherited down to all projects in that subgroup.

  • When enabled, creating a fork should only be allowed if the fork is created inside the group.
  • When disabled, group members should be able to fork anywhere.
  • Option should be available for Silver level and above.

This option should be disabled by default (changing behavior of existing groups is not desired). Note that this restriction would only apply to attempts to create new forks and won't affect any existing forks that are already in personal namespaces, which we should make clear in the documentation. This setting should inherit down a group hierarchy just like the "Private" setting.

Further details

As part of this change, we should remove this option from the Managed Accounts section so there's not 2 places to do the same thing. This option should be available to both private and public groups. It should only be able to be applied in the top level group and the setting flows down to all projects underneath.

Permissions and Security

This will live within group settings so the same permission rules apply as with other options there.

Documentation

Availability & Testing

What risks does this change pose to our availability?

This feature does would not affect GitLab.com or self managed instance's availability as a whole. In the worst case, forking might get be disabled for all users.

What additional test coverage or changes to tests will be needed?

  • When forking restriction is disabled on a group:

    • Any user should be able to fork a project. (Existing functionality and should be already covered by tests)
  • When forking restriction is enabled on a group:

    • A user (including owner) should not be able to fork a project to outside of group.
    • All users should should be able to fork a project to inside of the group.
    • A user (including owner) should not be able to fork a project in a sub-group to outside of group.

Tests should be added for the fork API as well.

New end-to-end tests are not needed as the coverage at lower level should be enough. However, we should ensure existing end-to-end tests are green by running the package-and-qa manual job.

Links / references

Existing Functionality in Projects: Screen_Shot_2020-05-07_at_2.47.18_PM https://docs.gitlab.com/ee/user/group/saml_sso/#outer-forks-restriction-for-group-managed-accounts

Other providers:

  • https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/managing-the-forking-policy-for-your-organization
  • https://confluence.atlassian.com/bitbucketserver/using-forks-in-bitbucket-server-776639958.html

Issue readiness

  • Product: issue description is accurate with an acceptable proposal for an MVC
  • Engineering: issue is implementable with few remaining questions, is sufficiently broken down, and is able to be estimated
Edited Jun 30, 2020 by Melissa Ushakov
Assignee
Assign to
Time tracking