竞赛讨论区的置顶和锁定
This commit is contained in:
parent
7103001613
commit
6d894c53d5
|
@ -103,8 +103,10 @@ class Message < ActiveRecord::Base
|
|||
:if => lambda {|message, user|
|
||||
if message.project
|
||||
user.allowed_to?(:edit_messages, message.project)
|
||||
else
|
||||
elsif message.course
|
||||
user.allowed_to?(:edit_messages, message.course)
|
||||
elsif message.contest
|
||||
user.admin_of_contest?(message.contest)
|
||||
end
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue