From 5c3ad3fcc7f8604608e0fdcd29b8da6e51fb4f65 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Thu, 15 Nov 2018 10:49:30 +0100 Subject: [PATCH] Automatic redirection to the O365 sign-in page business user flow Hotfix for supporting O365 update on 19th November 2018. See 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();