shows work packages with the correct author

pull/981/head
Jonas Heinrich 11 years ago
parent 4c894eca88
commit 9a9fd9f235
  1. 2
      app/controllers/my_controller.rb
  2. 2
      app/controllers/users_controller.rb

@ -60,7 +60,7 @@ class MyController < ApplicationController
def index
@user = User.current
@blocks = get_current_layout
@reported_count = WorkPackage.on_active_project.with_author(current_user).count
@reported_count = WorkPackage.on_active_project.with_author(@user).count
render :action => 'page', :layout => 'base'
end
alias :page :index

@ -90,7 +90,7 @@ class UsersController < ApplicationController
def show
# show projects based on current user visibility
@reported_count = WorkPackage.on_active_project.with_author(current_user).count
@reported_count = WorkPackage.on_active_project.with_author(@user).count
@memberships = @user.memberships.all(:conditions => Project.visible_by(User.current))
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)

Loading…
Cancel
Save