gitlabhq/app/controllers/admin/team_members_controller.rb
Robert Speicher 925183ed7a Add an AdminController base class for Admin controllers
Handles stuff that's shared across admin controllers.
2012-09-16 10:06:29 -04:00

22 lines
557 B
Ruby

class Admin::TeamMembersController < AdminController
def edit
@admin_team_member = UsersProject.find(params[:id])
end
def update
@admin_team_member = UsersProject.find(params[:id])
if @admin_team_member.update_attributes(params[:team_member])
redirect_to [:admin, @admin_team_member.project], notice: 'Project Access was successfully updated.'
else
render action: "edit"
end
end
def destroy
@admin_team_member = UsersProject.find(params[:id])
@admin_team_member.destroy
redirect_to :back
end
end