app/presenters/tree_builder_report_schedules.rb
# Get root nodes count/array for explorer tree
Get root nodes count/array for explorer tree
Get root nodes count / array for explorer tree
def x_get_tree_roots(count_only, _options)
    if User.current_user.current_group.miq_user_role.name.split('-').last == 'super_administrator'
      objects = MiqSchedule.where(:towhat => 'MiqReport')
    else
      objects = MiqSchedule.where(:towhat => 'MiqReport', :userid => User.current_user.userid)
    end
    count_only_or_objects(count_only, objects.sort_by { |o| o.name.downcase }, 'name')
  end
def x_get_tree_roots ( count_only , _options ) if User . current_user . current_group . miq_user_role . name . split ( '-' ) . last == 'super_administrator' objects = MiqSchedule . where ( :towhat => 'MiqReport' ) else objects = MiqSchedule . where ( :towhat => 'MiqReport' , :userid => User . current_user . userid ) end count_only_or_objects ( count_only , objects . sort_by { | o | o . name . downcase } , 'name' ) end
Get root nodes count/array for explorer tree
Get root nodes count / array for explorer tree
# Super admins see all report schedules
count_only
<not_specific>
_options
<not_specific>