summaryrefslogtreecommitdiff
path: root/lib/gitlab/access.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-3/+3
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-011-1/+1
|
* Enable Rails/DelegateDouwe Maan2017-02-231-3/+1
|
* Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-0/+4
| | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
* Optimize maximum user access level lookup in loading of notesStan Hu2016-07-261-0/+1
| | | | | | | | NotesHelper#note_editable? and ProjectTeam#human_max_access currently take about 16% of the load time of an issue page. This MR preloads the maximum access level of users for all notes in issues and merge requests with several queries instead of one per user and caches the result in RequestStore.
* Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-181-3/+5
| | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-131-5/+3
| | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
* Added "developers can merge" setting to protected branchesMathias Vestergaard2016-07-131-3/+5
| | | | | - Cherry-picked from `mvestergaard:branch-protection-dev-merge` - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4220
* Raise a new Gitlab::Access::AccessDeniedError when permission is not enough ↵Rémy Coutable2016-06-181-0/+2
| | | | | | | | to destroy a member This is a try for a new approach to put the access checks at the service level. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Improve description of branch protection levels.Douwe Maan2015-05-131-3/+3
|
* Improve protected branches selectbox optionsDmitriy Zaporozhets2015-02-031-5/+6
|
* Allow configuring protection of the default branch upon first pushMarco Wessel2015-01-251-0/+16
|
* Huge replace of old users_project and users_group referencesDmitriy Zaporozhets2014-09-141-0/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Improve admin user show pageDmitriy Zaporozhets2013-08-271-0/+4
| | | | | | Show permissions for all project. Add ability to remove user from group if not an owner Remove unnecessary admin controller
* Added Gitlab::Access moduleDmitriy Zaporozhets2013-08-201-0/+48