##// END OF EJS Templates
Adds buit-in groups to give specific permissions to anonymous and non members users per project (#17976)....
Adds buit-in groups to give specific permissions to anonymous and non members users per project (#17976). git-svn-id: http://svn.redmine.org/redmine/trunk@13417 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r13053:7e7ac5340a28
r13053:7e7ac5340a28
Show More
20140920094058_insert_builtin_groups.rb
21 lines | 488 B | text/x-ruby | RubyLexer
/ db / migrate / 20140920094058_insert_builtin_groups.rb
class InsertBuiltinGroups < ActiveRecord::Migration
def up
Group.reset_column_information
unless GroupAnonymous.any?
g = GroupAnonymous.new(:lastname => 'Anonymous users')
g.status = 1
g.save :validate => false
end
unless GroupNonMember.any?
g = GroupNonMember.new(:lastname => 'Non member users')
g.status = 1
g.save :validate => false
end
end
def down
GroupAnonymous.delete_all
GroupNonMember.delete_all
end
end