Commit 1fec31f55a752fcf32098210fd70b5e6b03725bc
1 parent
03427738
Exists in
master
and in
28 other branches
Adding all permissions when creating admin roles
Showing
1 changed file
with
2 additions
and
27 deletions
Show diff stats
app/models/environment.rb
@@ -28,38 +28,13 @@ class Environment < ActiveRecord::Base | @@ -28,38 +28,13 @@ class Environment < ActiveRecord::Base | ||
28 | :key => 'environment_administrator', | 28 | :key => 'environment_administrator', |
29 | :name => N_('Environment Administrator'), | 29 | :name => N_('Environment Administrator'), |
30 | :environment => self, | 30 | :environment => self, |
31 | - :permissions => [ | ||
32 | - 'view_environment_admin_panel', | ||
33 | - 'edit_environment_features', | ||
34 | - 'edit_environment_design', | ||
35 | - 'manage_environment_categories', | ||
36 | - 'manage_environment_roles', | ||
37 | - 'manage_environment_validators', | ||
38 | - 'edit_profile', | ||
39 | - 'destroy_profile', | ||
40 | - 'manage_memberships', | ||
41 | - 'post_content', | ||
42 | - 'edit_profile_design', | ||
43 | - 'manage_products', | ||
44 | - 'edit_appearance', | ||
45 | - 'manage_friends', | ||
46 | - 'validate_enterprise', | ||
47 | - 'perform_task', | ||
48 | - ] | 31 | + :permissions => PERMISSIONS[Environment.name].keys + PERMISSIONS[Profile.name].keys |
49 | ) | 32 | ) |
50 | Role.create!( | 33 | Role.create!( |
51 | :key => 'profile_admin', | 34 | :key => 'profile_admin', |
52 | :name => N_('Profile Administrator'), | 35 | :name => N_('Profile Administrator'), |
53 | :environment => self, | 36 | :environment => self, |
54 | - :permissions => [ | ||
55 | - 'edit_profile', | ||
56 | - 'destroy_profile', | ||
57 | - 'manage_memberships', | ||
58 | - 'post_content', | ||
59 | - 'edit_profile_design', | ||
60 | - 'manage_products', | ||
61 | - 'edit_appearance', | ||
62 | - ] | 37 | + :permissions => PERMISSIONS[Profile.name].keys |
63 | ) | 38 | ) |
64 | # members for enterprises, communities etc | 39 | # members for enterprises, communities etc |
65 | Role.create!( | 40 | Role.create!( |