Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/models/abilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def self.can?(user, action, resource)
end

def self.full_permission?(user)
return false if user.blank?

user.admin? || user.moderator?(self.moderator_roles)
end

Expand Down
2 changes: 1 addition & 1 deletion themes/elos/views/shared/_meeting_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<%# AI Artifacts dropdown %>
<% ai_release_date = Rails.configuration.ai_artifacts_release_date %>
<% recording_date = Time.at(meeting[:startTime].to_i / 1000.0).to_date %>
<% if ai_artifacts_enabled?(@room) && (ai_release_date.nil? || recording_date >= ai_release_date) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(@room) && (ai_release_date.nil? || recording_date >= ai_release_date) %>
<div class="dropdown dropdown-ai-artifacts">
<a href="#" class="dropdown-toggle text-decoration-none dropdown-ai-artifacts-link"
internal-meeting-id="<%= meeting[:internalMeetingID] %>"
Expand Down
2 changes: 1 addition & 1 deletion themes/elos/views/shared/_meetings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<% end %>

<%# AI Artifacts announcement %>
<% if ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% release_date = Rails.configuration.ai_artifacts_release_date %>
<div class="ai-artifacts-announcement">
<div class="announcement-main">
Expand Down
2 changes: 1 addition & 1 deletion themes/elos/views/shared/_scheduled_meetings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
data: { 'tracking-id': 'lti-view-history', 'institution-guid': "#{@institution_guid}" },
class: "btn btn-light"
%>
<% if ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<%= render "shared/ai_features_banner", room: room %>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/rnp/views/shared/_meeting_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<%# AI Artifacts dropdown %>
<% ai_release_date = Rails.configuration.ai_artifacts_release_date %>
<% recording_date = Time.at(meeting[:startTime].to_i / 1000.0).to_date %>
<% if ai_artifacts_enabled?(@room) && (ai_release_date.nil? || recording_date >= ai_release_date) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(@room) && (ai_release_date.nil? || recording_date >= ai_release_date) %>
<div class="dropdown dropdown-ai-artifacts">
<a href="#" class="dropdown-toggle text-decoration-none dropdown-ai-artifacts-link"
internal-meeting-id="<%= meeting[:internalMeetingID] %>"
Expand Down
2 changes: 1 addition & 1 deletion themes/rnp/views/shared/_meetings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<% end %>

<%# AI Artifacts announcement %>
<% if ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% release_date = Rails.configuration.ai_artifacts_release_date %>
<div class="ai-artifacts-announcement">
<div class="announcement-main">
Expand Down
2 changes: 1 addition & 1 deletion themes/rnp/views/shared/_scheduled_meetings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
data: { 'tracking-id': 'lti-view-history', 'institution-guid': "#{@institution_guid}" },
class: "btn btn-light"
%>
<% if ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<% if Abilities.full_permission?(user) && ai_artifacts_enabled?(room) && !hide_recordings_history?(room) %>
<%= render "shared/ai_features_banner", room: room %>
<% end %>
</div>
Expand Down