diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-18 19:01:50 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-18 23:09:17 +0300 |
commit | 396f85e438ddc9bcd89f5a557980ce82b71e098b (patch) | |
tree | 107f557ebf32d9cb76111edb36c656c54d80f5cc /app/controllers/groups/group_members_controller.rb | |
parent | 8b1656282bcc39a0c1c7a3dccf74c98b1c3adae2 (diff) |
Add expiration date to group memberships
Diffstat (limited to 'app/controllers/groups/group_members_controller.rb')
-rw-r--r-- | app/controllers/groups/group_members_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/groups/group_members_controller.rb b/app/controllers/groups/group_members_controller.rb index 9fc41a12536..272164cd0cc 100644 --- a/app/controllers/groups/group_members_controller.rb +++ b/app/controllers/groups/group_members_controller.rb @@ -21,7 +21,12 @@ class Groups::GroupMembersController < Groups::ApplicationController end def create - @group.add_users(params[:user_ids].split(','), params[:access_level], current_user) + @group.add_users( + params[:user_ids].split(','), + params[:access_level], + current_user: current_user, + expires_at: params[:expires_at] + ) redirect_to group_group_members_path(@group), notice: 'Users were successfully added.' end @@ -63,7 +68,7 @@ class Groups::GroupMembersController < Groups::ApplicationController protected def member_params - params.require(:group_member).permit(:access_level, :user_id) + params.require(:group_member).permit(:access_level, :user_id, :expires_at) end # MembershipActions concern |