From 49bb8304c0bc61ef34b07780922aa2d234d42c5c Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 31 Oct 2013 16:15:08 +0800 Subject: [PATCH] Fix approval authorized_users_by_title and get_authorization_by_title --- lib/orbit_model/authorizable.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)