Shibboleth: Show the inspector if OWNCLOUD_SHIBBOLETH_DEBUG is set

Help to debug https://github.com/owncloud/enterprise/issues/1265
This commit is contained in:
Olivier Goffart 2016-05-17 12:28:07 +02:00
parent 31b27bea38
commit cf1fe690a3

View file

@ -38,7 +38,12 @@ namespace OCC
class UserAgentWebPage : public QWebPage {
public:
UserAgentWebPage(QObject *parent) : QWebPage(parent) {}
UserAgentWebPage(QObject *parent) : QWebPage(parent)
{
if (!qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty()) {
settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
}
}
QString userAgentForUrl(const QUrl &url ) const {
return QWebPage::userAgentForUrl(url) + " " + Utility::userAgentString();
}