mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums.
These permissions need to be explicitly given to the Anonymous role (Admin -> Roles & Permissions -> Anonymous). git-svn-id: http://redmine.rubyforge.org/svn/trunk@919 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -107,15 +107,15 @@ class TimelogController < ApplicationController
|
||||
@entries = (@issue ? @issue : @project).time_entries.find(:all, :include => [:activity, :user, {:issue => [:tracker, :assigned_to, :priority]}], :order => sort_clause)
|
||||
|
||||
@total_hours = @entries.inject(0) { |sum,entry| sum + entry.hours }
|
||||
@owner_id = logged_in_user ? logged_in_user.id : 0
|
||||
@owner_id = User.current.id
|
||||
|
||||
send_csv and return if 'csv' == params[:export]
|
||||
render :action => 'details', :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
def edit
|
||||
render_404 and return if @time_entry && @time_entry.user != logged_in_user
|
||||
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => logged_in_user, :spent_on => Date.today)
|
||||
render_404 and return if @time_entry && @time_entry.user != User.current
|
||||
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
|
||||
@time_entry.attributes = params[:time_entry]
|
||||
if request.post? and @time_entry.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
|
||||
Reference in New Issue
Block a user