Updated orbit core lib for module app

This commit is contained in:
saurabhbhatia 2013-11-05 11:25:35 +08:00
parent 54f778f17d
commit 3d758cabb3
1 changed files with 1 additions and 1 deletions

View File

@ -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