mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-26 11:11:20 +00:00
Add gather moderators
Fix few gather issues
This commit is contained in:
parent
cf3f5676b0
commit
6122caa125
3 changed files with 4 additions and 4 deletions
|
@ -149,7 +149,7 @@ class Gatherer < ActiveRecord::Base
|
|||
def can_update? cuser, params = {}
|
||||
return false unless cuser
|
||||
if params.keys.include? "username"
|
||||
if cuser.admin?
|
||||
if cuser.admin? or cuser.gather_moderator?
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
@ -166,6 +166,6 @@ class Gatherer < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def can_destroy? cuser
|
||||
cuser and ((user == cuser or cuser.admin?) and gather.status == Gather::STATE_RUNNING)
|
||||
cuser and ((user == cuser or cuser.admin? or gather_moderator) and gather.status == Gather::STATE_RUNNING)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<li<% if gatherer.status > 0 %> class="away"<% end %>>
|
||||
<%= flag gatherer.user.country %>
|
||||
<%= namelink gatherer.user %>
|
||||
<% if cuser and cuser.admin? %>
|
||||
<% if cuser and (cuser.admin? or cuser.gather_moderator?) %>
|
||||
<%= link_to gatherer, method: :delete, class: 'delete' do %>
|
||||
<%= icon 'times' %>
|
||||
<% end %>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
|
||||
<%= link_to "Mute", '#', id: "mute", class: 'button tiny' %>
|
||||
<% if cuser and cuser.admin? %>
|
||||
<% if cuser and (cuser.admin? or cuser.gather_moderators?) %>
|
||||
<%= link_to "Admin Page", edit_gather_url, class: 'admin button' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue