From 3d758cabb3ec39d25a7c29a1dd7062ff857c0042 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Tue, 5 Nov 2013 11:25:35 +0800 Subject: [PATCH] Updated orbit core lib for module app --- lib/orbit_core_lib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index 74bc07785..220346f28 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -279,7 +279,7 @@ module OrbitCoreLib end def check_user_can_use - unless current_or_guest_user.admin? || @module_app.is_manager?(current_or_guest_user) || @module_app.is_sub_manager?(current_or_guest_user) || @module_app.can_approve?(current_or_guest_user) + unless current_or_guest_user.admin? || (@module_app.is_manager?(current_or_guest_user) if @module_app.present?) || (@module_app.is_sub_manager?(current_or_guest_user) if @module_app.present?) || (@module_app.can_approve?(current_or_guest_user) if @module_app.present?) redirect_to root_url end end