Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !7144

Fix project member access for group links

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Sean McGivern requested to merge 23872-members-of-group-that-has-project-access-getting-404-on-accessing-a-project-issue into master Oct 27, 2016
  • Overview 19
  • Commits 2
  • Pipelines 3
  • Changes 2

What does this MR do?

Among other things, ensure that users who have access to a project through a group link can see confidential issues.

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

I tried to keep the change as minimal as possible.

Why was this MR needed?

ProjectTeam#find_member doesn't take group links into account. It was used in two places:

  1. An admin view - it can stay here.
  2. ProjectTeam#member?, which is often used to decide if a user has access to view something.

This second part broke confidential issues viewing. IssuesFinder ends up delegating to Project#authorized_for_user?, which does consider group links, so users with access to the project via a group link could see confidential issues on the index page. However, IssuesPolicy used ProjectTeam#member?, so the same user couldn't view the issue when going to it directly.

Does this MR meet the acceptance criteria?

  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Branch has no merge conflicts with master (if it does - rebase it please)
  • Squashed related commits together

What are the relevant issue numbers?

Closes #23872 (closed).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 23872-members-of-group-that-has-project-access-getting-404-on-accessing-a-project-issue