From c44109958af05e98046d67c39110abb1ac24c64c Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 14 Nov 2018 12:56:04 +0100 Subject: [PATCH] Allow automatic redirection to the O365 sign-in page in the business user flow [SCI-2853] --- app/views/assets/edit.erb | 2 ++ app/views/assets/view.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/assets/edit.erb b/app/views/assets/edit.erb index 9211a4220..17e71dc25 100644 --- a/app/views/assets/edit.erb +++ b/app/views/assets/edit.erb @@ -53,6 +53,8 @@ // This attribute allows true fullscreen mode in slideshow view // when using PowerPoint Online's 'view' action. office_frame.setAttribute('allowfullscreen', 'true'); + // The sandbox attribute is needed to allow automatic redirection to the O365 sign-in page in the business user flow + office_frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-popups-to-escape-sandbox'); frameholder.appendChild(office_frame); document.getElementById('office_form').submit(); diff --git a/app/views/assets/view.erb b/app/views/assets/view.erb index 798caa5b8..e20aa03ff 100644 --- a/app/views/assets/view.erb +++ b/app/views/assets/view.erb @@ -53,6 +53,8 @@ // This attribute allows true fullscreen mode in slideshow view // when using PowerPoint Online's 'view' action. office_frame.setAttribute('allowfullscreen', 'true'); + // The sandbox attribute is needed to allow automatic redirection to the O365 sign-in page in the business user flow + office_frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-popups-to-escape-sandbox'); frameholder.appendChild(office_frame); document.getElementById('office_form').submit();