diff --git a/lib/orbit_model/authorizable.rb b/lib/orbit_model/authorizable.rb index 90c1cc2c8..01ec5cdb0 100644 --- a/lib/orbit_model/authorizable.rb +++ b/lib/orbit_model/authorizable.rb @@ -36,13 +36,13 @@ module OrbitModel # Specific case # Approval or sub-manager is defined on something else than categories def authorized_users_by_title(title) - approval_users if auth_approval && auth_approval.title.eql?(title) - sub_managers if auth_sub_manager && auth_sub_manager.title.eql?(title) + return approval_users if auth_approval && auth_approval.title.eql?(title) + return sub_managers if auth_sub_manager && auth_sub_manager.title.eql?(title) end def get_authorization_by_title(title) - auth_approval if auth_approval && auth_approval.title.eql?(title) - auth_sub_manager if auth_sub_manager && auth_sub_manager.title.eql?(title) + return auth_approval if auth_approval && auth_approval.title.eql?(title) + return auth_sub_manager if auth_sub_manager && auth_sub_manager.title.eql?(title) end def user_is_authorized_by_title?(user, title)