fix revision history broken bug
Fixes https://github.com/openSUSE/osem/issues/2334
This commit is contained in:
parent
1544cdd23e
commit
a776641668
2 changed files with 9 additions and 5 deletions
|
|
@ -6,12 +6,15 @@ module Admin
|
|||
load_and_authorize_resource class: PaperTrail::Version
|
||||
|
||||
def index
|
||||
@conferences_with_role = current_user.is_admin? ? Conference.pluck(:short_title) : Conference.with_role([:organizer, :cfp, :info_desk], current_user).pluck(:short_title)
|
||||
|
||||
if Conference.any?
|
||||
@conferences_with_role = current_user.is_admin? ? Conference.pluck(:short_title) : Conference.with_role([:organizer, :cfp, :info_desk], current_user).pluck(:short_title)
|
||||
@conferences_with_role.uniq!
|
||||
end
|
||||
if current_user.has_cached_role? :organization_admin, :any
|
||||
@conferences_with_role = Organization.with_role('organization_admin', current_user).map { |org| org.conferences.pluck :short_title }.flatten
|
||||
@conferences_with_role.uniq!
|
||||
end
|
||||
@conferences_with_role.uniq!
|
||||
|
||||
|
||||
return if @conference.blank?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue