parent
2d90215de2
commit
5366b50c56
|
@ -59,9 +59,13 @@ class UsersController < ApplicationController
|
||||||
helper :words
|
helper :words
|
||||||
#added by young
|
#added by young
|
||||||
def user_projects
|
def user_projects
|
||||||
cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1"
|
|
||||||
@memberships = @user.memberships.all(:conditions => cond)
|
if User.current.admin?
|
||||||
|
@memberships = @user.memberships.all
|
||||||
|
else
|
||||||
|
cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1"
|
||||||
|
@memberships = @user.memberships.all(:conditions => cond)
|
||||||
|
end
|
||||||
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20)
|
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20)
|
||||||
@events_by_day = events.group_by(&:event_date)
|
@events_by_day = events.group_by(&:event_date)
|
||||||
@state = 0
|
@state = 0
|
||||||
|
|
Loading…
Reference in New Issue