Commit 9be280468b327027d68ed0575e27519cd2b8c823
1 parent
cb6f9c1a
Exists in
staging
and in
4 other branches
Revert "Fix profile role verification"
This reverts commit cb6f9c1af4cb662c41c28cd8eb0b7fa37e886cda.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/profile.rb
@@ -73,7 +73,7 @@ class Profile < ActiveRecord::Base | @@ -73,7 +73,7 @@ class Profile < ActiveRecord::Base | ||
73 | find_role('editor', env_id) | 73 | find_role('editor', env_id) |
74 | end | 74 | end |
75 | def self.organization_member_roles(env_id) | 75 | def self.organization_member_roles(env_id) |
76 | - all_roles(env_id).select{ |r| r.key.match(/^profile_/) unless r.key.blank? } | 76 | + all_roles(env_id).select{ |r| r.key.match(/^profile_/) unless r.key.blank? || !r.profile_id.nil?} |
77 | end | 77 | end |
78 | def self.all_roles(env_id) | 78 | def self.all_roles(env_id) |
79 | Role.all :conditions => { :environment_id => env_id } | 79 | Role.all :conditions => { :environment_id => env_id } |