Sha256: 7aba93fe90967ed9179e21981d37d6c7a675ef1811c1abf4e04c0e9b9bc88160

Contents?: true

Size: 489 Bytes

Versions: 3

Compression:

Stored size: 489 Bytes

Contents

class PermissionsController < ApplicationController
  before_filter :authorize_admin
  layout Saucy::Layouts.to_proc

  def edit
    @user     = User.find(params[:user_id])
    @projects = current_account.projects_by_name
    render
  end

  def update
    user = User.find(params[:user_id])
    user.update_permissions_for(current_account, params[:permissions][:project_ids])
    flash[:success] = "Permissions updated."
    redirect_to account_memberships_url(current_account)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
saucy-0.1.3 app/controllers/permissions_controller.rb
saucy-0.1.2 app/controllers/permissions_controller.rb
saucy-0.1.1 app/controllers/permissions_controller.rb