summaryrefslogtreecommitdiff
path: root/app/models/members
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant class_name and foreign_key overridesDavid Wagner2016-10-242-2/+2
| | | | | | They were Rails' default and are unnecessarily overridden. Signed-off-by: David Wagner <david@marvid.fr>
* Differentiate the expire from leave eventCallum Dryden2016-10-201-1/+5
| | | | | | | | | | At the moment we cannot see weather a user left a project due to their membership expiring of if they themselves opted to leave the project. This adds a new event type that allows us to make this differentiation. Note that is not really feasable to go back and reliably fix up the previous events. As a result the events for previous expire removals will remain the same however events of this nature going forward will be correctly represented.
* Allow Member.add_user to handle access requestersRémy Coutable2016-09-282-29/+31
| | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'master' into expiration-date-on-membershipsSean McGivern2016-08-181-3/+4
|\
| * New AccessRequests API endpoints for Group & ProjectRémy Coutable2016-08-101-0/+1
| | | | | | | | | | | | | | | | Also, mutualize AccessRequests and Members endpoints for Group & Project. New API documentation for the AccessRequests endpoints. Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Fix Rename `add_users_into_project` and `projects_ids`Herminio Torres2016-08-041-3/+3
| | | | | | | | | | | | We never add things `into` projects, we just add them `to` projects. So how about we rename this to `add_users_to_project`. Rename `projects_ids` to `project_ids` by following the convention of rails.
* | Replace optional parameters with keyword arguments.Adam Niedzielski2016-08-021-2/+8
| |
* | WIPAdam Niedzielski2016-08-011-2/+2
|/
* Enable Style/EmptyLines cop, remove redundant onesrubocop/enable-cops-for-empty-linesGrzegorz Bizon2016-07-011-1/+0
|
* New Members::DestroyServiceRémy Coutable2016-06-182-24/+0
| | | | | | | 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>
* UI and copywriting improvements13948-access-request-to-projects-and-groupsRémy Coutable2016-06-142-4/+9
| | | | | | | | | + 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-142-22/+23
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Initial implementation of user access request to projectsDavid Alexander2016-06-141-0/+18
|
* Add changelog and code refactorLong Nguyen2016-05-301-1/+5
|
* Fix Member specLong Nguyen2016-05-221-1/+1
|
* Fix broken specsLong Nguyen2016-05-211-2/+1
|
* Remove todos when destroy project member and specsLong Nguyen2016-05-211-1/+3
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-092-38/+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
* Annotate the modelsZeger-Jan van de Weg2016-05-062-8/+8
|
* Small refactoring and cleanup of notification logicDmitriy Zaporozhets2016-03-302-2/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Use consistent markup and styling for highlighting across blobs, diffs, ↵Douwe Maan2016-01-211-3/+3
| | | | blame and snippets
* Re-annotate modelsStan Hu2015-05-032-2/+10
|
* Follow newline guidelines.Douwe Maan2015-04-141-0/+1
|
* Remove duplication between Group and ProjectMember.Douwe Maan2015-04-141-17/+2
|
* Let invites be declined.Douwe Maan2015-04-142-0/+12
|
* Let members be invited from Add members pane.Douwe Maan2015-04-141-3/+19
|
* Add emails around invitation.Douwe Maan2015-04-142-0/+24
|
* Add invite logic to Member.Douwe Maan2015-04-142-36/+20
|
* Track who created a group or project member.Douwe Maan2015-04-141-1/+2
|
* Use `project_member` instead of `team_member`.Douwe Maan2015-03-151-2/+2
|
* Add "User created project Namespace / Project" eventDouwe Maan2015-02-131-3/+5
|
* Move all event creation to EventCreateService.Douwe Maan2015-02-131-11/+6
|
* Added support for firing system hooks on group create/destroy and ↵Boyan Tabakov2015-01-271-2/+12
| | | | | | adding/removing users to group. Added tests and updated docs. Also adding 'user_id' field in the hooks for adding/removing user from team.
* annotateValery Sizov2014-10-092-0/+30
|
* Add parenthesis to function def with arguments.Ciro Santilli2014-10-031-1/+1
|
* Fix STI+polymorphic for Group <-> GroupMemberDmitriy Zaporozhets2014-09-142-2/+5
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix migration and association for new members tableDmitriy Zaporozhets2014-09-142-0/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Huge replace of old users_project and users_group referencesDmitriy Zaporozhets2014-09-142-0/+173
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>