An error occurred fetching the project authors.
  1. 22 Aug, 2019 1 commit
  2. 12 Apr, 2019 1 commit
  3. 20 Feb, 2018 2 commits
  4. 02 Feb, 2018 1 commit
  5. 29 Dec, 2017 1 commit
  6. 27 Jul, 2017 1 commit
  7. 23 Jun, 2017 1 commit
    • Toon Claes's avatar
      Add User#full_private_access? to check if user has Private access · b90f1098
      Toon Claes authored
      In CE only the admin has access to all private groups & projects. In EE also an
      auditor can have full private access.
      
      To overcome merge conflicts, or accidental incorrect access rights, abstract
      this out in `User#full_private_access?`.
      
      `User#admin?` now only should be used for admin-only features. For private
      access-related features `User#full_private_access?` should be used.
      
      Backported from gitlab-org/gitlab-ee!2199
      b90f1098
  8. 21 Jun, 2017 1 commit
  9. 16 Jun, 2017 1 commit
    • Yorick Peterse's avatar
      Refactor ProjectsFinder#init_collection · d2934722
      Yorick Peterse authored
      This changes ProjectsFinder#init_collection so it no longer relies on a
      UNION. For example, to get starred projects of a user we used to run:
      
          SELECT projects.*
          FROM projects
          WHERE projects.pending_delete = 'f'
          AND (
              projects.id IN (
                  SELECT projects.id
                  FROM projects
                  INNER JOIN users_star_projects
                      ON users_star_projects.project_id = projects.id
                  INNER JOIN project_authorizations
                      ON projects.id = project_authorizations.project_id
                  WHERE projects.pending_delete = 'f'
                  AND project_authorizations.user_id = 1
                  AND users_star_projects.user_id = 1
      
                  UNION
      
                  SELECT projects.id
                  FROM projects
                  INNER JOIN users_star_projects
                      ON users_star_projects.project_id = projects.id
                  WHERE projects.visibility_level IN (20, 10)
                  AND users_star_projects.user_id = 1
              )
          )
          ORDER BY projects.id DESC;
      
      With these changes the above query is turned into the following instead:
      
          SELECT projects.*
          FROM projects
          INNER JOIN users_star_projects
              ON users_star_projects.project_id = projects.id
          WHERE projects.pending_delete = 'f'
          AND (
              EXISTS (
                  SELECT 1
                  FROM project_authorizations
                  WHERE project_authorizations.user_id = 1
                  AND (project_id = projects.id)
              )
              OR projects.visibility_level IN (20,10)
          )
          AND users_star_projects.user_id = 1
          ORDER BY projects.id DESC;
      
      This query in turn produces a better execution plan and takes less time,
      though the difference is only a few milliseconds (this however depends
      on the amount of data involved and additional conditions that may be
      added).
      d2934722
  10. 20 Mar, 2017 1 commit
    • Toon Claes's avatar
      Make level_value accept string integers · 71306f14
      Toon Claes authored
      When a VisibilityLevel is an integer formatted as a string, convert it
      to an integer, instead of looking it up in the hash map.
      
      When the value is not recognized, default to PRIVATE.
      71306f14