consolidate_object_auth for 171 production
This commit is contained in:
parent
b3a9a7ab07
commit
a50ccdafb2
|
@ -46,7 +46,7 @@ class ModuleApp
|
|||
def assign_manager(user,assigner)
|
||||
manager = AppManager.first(conditions: {managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if manager.nil?
|
||||
manager = self.managers.create(:user => user,:rule_creator => assigner)
|
||||
manager = self.managers.create(:user_id => user.id,:rule_creator_id => (assigner.id rescue nil))
|
||||
end
|
||||
manager
|
||||
end
|
||||
|
@ -54,7 +54,7 @@ class ModuleApp
|
|||
def assign_sub_manager(user,assigner)
|
||||
submanager = AppManager.first(conditions: {sub_managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if submanager.nil? && !self.managing_users.include?(user)
|
||||
submanager = self.sub_managers.create(:user_id => user.id,:rule_creator_id => assigner.id)
|
||||
submanager = self.sub_managers.create(:user_id => user.id,:rule_creator_id => (assigner.id rescue nil) )
|
||||
end
|
||||
submanager
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue