603e11d7a5
Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users. This migration: * is irreversible (please, don't forget to *backup* your database before upgrading) * resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading) git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81
16 lines
403 B
Ruby
16 lines
403 B
Ruby
class InsertBuiltinRoles < ActiveRecord::Migration
|
|
def self.up
|
|
nonmember = Role.new(:name => 'Non member', :position => 0)
|
|
nonmember.builtin = Role::BUILTIN_NON_MEMBER
|
|
nonmember.save
|
|
|
|
anonymous = Role.new(:name => 'Anonymous', :position => 0)
|
|
anonymous.builtin = Role::BUILTIN_ANONYMOUS
|
|
anonymous.save
|
|
end
|
|
|
|
def self.down
|
|
Role.destroy_all 'builtin <> 0'
|
|
end
|
|
end
|