gitlab-org--gitlab-foss/app/controllers/dashboard/application_controller.rb
Rubén Dávila 24226b9fe2 Update last_activity_on for Users on some main GET endpoints
In order to have an accurate date about the last activity of a User
we need to update the last_activity_on field when the User is visiting
some basic pages of GitLab like pages related to Dashboards, Projects,
Issues and Merge Requests
2019-02-05 09:55:31 -05:00

16 lines
350 B
Ruby

# frozen_string_literal: true
class Dashboard::ApplicationController < ApplicationController
include ControllerWithCrossProjectAccessCheck
include RecordUserLastActivity
layout 'dashboard'
requires_cross_project_access
private
def projects
@projects ||= current_user.authorized_projects.sorted_by_activity.non_archived
end
end