summaryrefslogtreecommitdiff
path: root/app/models/member.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make Member#add_user set access_level for requestersbackport-part-of-ee-744Rémy Coutable2016-10-031-1/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use the new Members::ApproveAccessRequestService in Member#add_user21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-accessRémy Coutable2016-09-281-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-29/+50
| | | | | | | | | | | | | | | | | | | | | 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>
* Exclude some pending or inactivated rows in Member scopesNick Thomas2016-09-081-8/+25
| | | | | | | | | An unapproved access request should not give access rights, and blocked users should not be considered members of anything. One visible outcome of this behaviour is that owners and masters of a group or project may be blocked, yet still receive notification emails for access requests. This commit prevents this from happening.
* Allow project group links to be expiredSean McGivern2016-08-181-5/+1
|
* Create Member.expired scope.Adam Niedzielski2016-08-091-0/+1
|
* Remove scopes.Adam Niedzielski2016-08-041-2/+1
|
* Add Member#expires? method.Adam Niedzielski2016-08-041-0/+4
|
* Replace optional parameters with keyword arguments.Adam Niedzielski2016-08-021-1/+1
|
* WIPAdam Niedzielski2016-08-011-2/+4
|
* Incorporate review commentsStan Hu2016-07-261-0/+4
|
* Exclude requesters from Project#members, Group#members and User#membersexplicit-requesters-scopeRémy Coutable2016-07-011-2/+0
| | | | | | And create new Project#requesters, Group#requesters scopes. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Reduce overhead and optimize ProjectTeam#max_member_access performanceStan Hu2016-06-291-0/+1
| | | | | | | | | | | The previous implementation would load the entire team member list and their respective attributes. Now we only search for the user's specific access level. In gitlab-com/operations#42, this reduces the overall overhead of rendering the issue from 28% to 20%. First step of optimizing #19273
* New Members::DestroyServiceRémy Coutable2016-06-181-6/+1
| | | | | | | This is to ensure we don't send unwanted notifications when deleting a project. In other words, stop abusing AR callbacks and use services. Signed-off-by: Rémy Coutable <remy@rymai.me>
* fixed merge conflictsJames Lopez2016-06-161-6/+47
|\
| * UI and copywriting improvements13948-access-request-to-projects-and-groupsRémy Coutable2016-06-141-19/+16
| | | | | | | | | | | | | | | | | | + Move 'Edit Project/Group' out of membership-related partial + Show the access request buttons only to logged-in users + Put the request access buttons out of in a more visible button + Improve the copy in the #remove_member_message helper Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Add request access for groupsRémy Coutable2016-06-141-28/+22
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Initial implementation of user access request to projectsDavid Alexander2016-06-141-5/+55
| |
* | Merge branches 'feature/project-export' and 'feature/project-import' of ↵James Lopez2016-06-131-19/+0
|\ \ | |/ | | | | | | | | | | | | | | gitlab.com:gitlab-org/gitlab-ce into feature/project-import # Conflicts: # app/models/project.rb # db/schema.rb # lib/gitlab/import_export/import_export_reader.rb
| * Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-19/+0
| | | | | | | | | | | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* | started refactoring some stuff based on MR feedbackJames Lopez2016-06-011-5/+5
| |
* | import uploads. Fixed a few things to do with members, triggers, etc...James Lopez2016-05-191-4/+5
|/
* Annotate the modelsZeger-Jan van de Weg2016-05-061-4/+4
|
* Reuse `User#notification_settings_for` when it's possibleDouglas Barbosa Alexandre2016-04-111-1/+1
|
* Fix few bugs related to recent notifications refactoringDmitriy Zaporozhets2016-03-301-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor creating notification setting with defaultsDmitriy Zaporozhets2016-03-301-6/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Remove useless Notification modelDmitriy Zaporozhets2016-03-301-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Small refactoring and cleanup of notification logicDmitriy Zaporozhets2016-03-301-0/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Update NotificationService to use NotificationSettings instead of membershipDmitriy Zaporozhets2016-03-301-1/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Create notification setting when membership createdDmitriy Zaporozhets2016-03-301-0/+10
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Re-add EmailValidator to avoid the repetition of format: { with: ↵streamline-email-validationRémy Coutable2016-02-091-2/+1
| | | | Devise.email_regexp }
* Validate email addresses using Devise.email_regexpRémy Coutable2016-02-091-2/+2
| | | | | | | Also: - Get rid of legacy :strict_mode - Get rid of custom :email validator - Add some shared examples to spec emails validation
* Creator should be added as a master of the project on creationDouglas Barbosa Alexandre2016-01-201-1/+6
| | | | | This also enable a project creator to add themselves as a master of the project.
* Refactor ability changesDouwe Maan2015-11-171-11/+15
|
* fixing rubocop - random code not related to the changesJames Lopez2015-11-121-5/+9
|
* fixing rubocop indentsJames Lopez2015-11-121-1/+2
|
* fixing rubocop indentsJames Lopez2015-11-121-1/+3
|
* refactored code as projects only have one owner. Kept some refactoring in ↵James Lopez2015-11-111-7/+6
| | | | place (has_owners concern)
* refactored permissions and added update_project_member ability logic. Also ↵James Lopez2015-11-031-4/+4
| | | | refactored owner methods to a concern.
* fix issue with adding members to project (spotted by test)James Lopez2015-10-301-2/+11
|
* fixed last group owner issue and added testJames Lopez2015-10-291-4/+5
|
* Re-annotate modelsStan Hu2015-05-031-3/+3
|
* Add spinach tests around accepting and declining invitations.Douwe Maan2015-04-141-0/+2
|
* Remove duplication between Group and ProjectMember.Douwe Maan2015-04-141-3/+33
|
* Let invites be declined.Douwe Maan2015-04-141-0/+14
|
* Add invites controller.Douwe Maan2015-04-141-0/+7
|
* Add invite logic to Member.Douwe Maan2015-04-141-2/+80
|
* Track who created a group or project member.Douwe Maan2015-04-141-0/+5
|
* Explicitly define ordering in models using default_scopeDmitriy Zaporozhets2015-02-051-0/+1
|
* annotateValery Sizov2014-10-091-0/+15
|