From cc643ce932b2abdc56c4d1933c02806ca57ddefa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 13 Sep 2008 16:31:11 +0000 Subject: Merged nbc branch @ r1812 (commit access permission and reposman improvements). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1814 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/096_add_commit_access_permission.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/096_add_commit_access_permission.rb (limited to 'db') diff --git a/db/migrate/096_add_commit_access_permission.rb b/db/migrate/096_add_commit_access_permission.rb new file mode 100644 index 000000000..f73af2c0c --- /dev/null +++ b/db/migrate/096_add_commit_access_permission.rb @@ -0,0 +1,14 @@ +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 -- cgit v1.2.3