view db/migrate/096_add_commit_access_permission.rb @ 141:ab75f33dcc6f luisf

Issue #31: issue submitters and assignees are added to the watchers list. incomplete: there is no option to select/unselect the assignee.
author luisf
date Thu, 20 Jan 2011 13:08:43 +0000
parents 513646585e45
children cbb26bc654de
line wrap: on
line source
class AddCommitAccessPermission < ActiveRecord::Migration

  def self.up
	Role.find(:all).select { |r| not r.builtin? }.each do |r|
	     r.add_permission!(:commit_access)
  	end
  end

  def self.down
	Role.find(:all).select { |r| not r.builtin? }.each do |r|
	     r.remove_permission!(:commit_access)
  	end
  end
end