%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
%>
<% provide :page_title do %>
<%= t('titles.unauthorized_action', %{Unauthorized}) %>
<% end %>
<% @show_left_side = false %>
<% @show_embedded_chat = false %>
<% add_body_class 'full-width' %>
<% if @needs_cookies %>
<%= t('headings.needs_cookies', %{Cookies Required}) %>
<% elsif @unauthorized_reason == :unpublished %>
<%= t('headings.unpublished', %{Not Yet Available}) %>
<% else %>
<% if request.query_parameters[:embedded] %>
<%= t("Access Denied") %>
<% else %>
<%= t("Access Denied") %>
<% end %>
<% end %>
<% if @unauthorized_message %>
<%= @unauthorized_message %>
<% elsif @needs_cookies %>
<%= t('Please adjust your security preferences before continuing.') %>
<% elsif @files_domain %>
<%= t('needs_login', %{Access to this page is limited to authorized users. You do not currently have permission to view this page.}) %>
<% elsif @context %>
<% if @context.try_rescue(:is_public) %>
<%= mt 'public_course', 'This page is part of the content for the course, **%{course}**.', :course => @context.name %>
<% end %>
<%= t("You don't have access to view this resource.") %>
<% if send_broken_content! %>
<%= I18n.t("We've let your instructor know to review this link as soon as possible.") %>
<% end %>
<% end %>