Skip to content

Commit fe905b6

Browse files
Merge pull request #19 from nextcloud/bugfix/noid/allow-to-login
Do not block the login page
2 parents 9041688 + 115e52b commit fe905b6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/AppInfo/Application.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ public function register() {
4444
$this->createNotificationOnFirstLogin();
4545

4646
Util::connectHook('OC_Filesystem', 'preSetup', $this, 'addStorageWrapper');
47-
Util::addStyle('terms_of_service', 'overlay');
48-
Util::addScript('terms_of_service', 'terms_of_service_user');
47+
48+
$request = $this->getContainer()->getServer()->getRequest();
49+
if (!\OC::$CLI && strpos($request->getPathInfo(), '/login') !== 0
50+
&& substr($request->getScriptName(), 0 - \strlen('/index.php')) === '/index.php') {
51+
Util::addStyle('terms_of_service', 'overlay');
52+
Util::addScript('terms_of_service', 'terms_of_service_user');
53+
}
4954
}
5055

5156
public function addStorageWrapper() {

0 commit comments

Comments
 (0)