forked from saurabh/orbit4-5
fix for frontend authorization
This commit is contained in:
parent
79554de201
commit
e791339c4e
|
@ -168,7 +168,9 @@ module OrbitHelper
|
|||
if @current_user.is_admin? or @current_user.is_manager?(@module_app)
|
||||
return true
|
||||
else
|
||||
return @current_user.approved_categories.include?cat rescue false
|
||||
category = Category.find(cat) rescue nil
|
||||
return false if category.nil?
|
||||
return @current_user.approved_categories.include?category rescue false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue