gitlabhq/app/controllers/admin/team_members_controller.rb

27 lines
654 B
Ruby
Raw Normal View History

2011-10-08 23:36:38 +02:00
class Admin::TeamMembersController < ApplicationController
2011-11-02 16:21:17 +01:00
layout "admin"
2011-10-08 23:36:38 +02:00
before_filter :authenticate_user!
before_filter :authenticate_admin!
def edit
@admin_team_member = UsersProject.find(params[:id])
end
def update
@admin_team_member = UsersProject.find(params[:id])
2011-10-27 15:44:29 +02:00
if @admin_team_member.update_attributes(params[:team_member])
2012-02-11 18:56:18 +01:00
redirect_to [:admin, @admin_team_member.project], notice: 'Project Access was successfully updated.'
2011-10-27 15:44:29 +02:00
else
render action: "edit"
2011-10-08 23:36:38 +02:00
end
end
def destroy
@admin_team_member = UsersProject.find(params[:id])
@admin_team_member.destroy
2012-02-11 18:56:18 +01:00
redirect_to :back
2011-10-08 23:36:38 +02:00
end
end