-
- Downloads
Add User#full_private_access? to check if user has Private access
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
Showing
- app/finders/issues_finder.rb 1 addition, 1 deletionapp/finders/issues_finder.rb
- app/models/project_feature.rb 1 addition, 1 deletionapp/models/project_feature.rb
- app/models/user.rb 6 additions, 0 deletionsapp/models/user.rb
- changelogs/unreleased/tc-refactor-projects-finder-init-collection.yml 4 additions, 0 deletions...nreleased/tc-refactor-projects-finder-init-collection.yml
- lib/gitlab/visibility_level.rb 1 addition, 1 deletionlib/gitlab/visibility_level.rb
- spec/lib/gitlab/visibility_level_spec.rb 3 additions, 3 deletionsspec/lib/gitlab/visibility_level_spec.rb
- spec/models/user_spec.rb 14 additions, 0 deletionsspec/models/user_spec.rb
Please register or sign in to comment