Procházet zdrojové kódy

Added auth for ombi request - different from ombi view - Fixed #870

causefx před 8 roky
rodič
revize
0d17663121

+ 6 - 5
api/config/default.php

@@ -70,9 +70,9 @@ return array(
 	'qBittorrentHideCompleted' => false,
 	'qBittorrentSortOrder' => 'eta',
 	'qBittorrentReverseSorting' => false,
-    'homepageCalendarEnabled' => 'true',
-    'homepageCalendarAuth' => '4',
-    'calendariCal' => '',
+	'homepageCalendarEnabled' => 'true',
+	'homepageCalendarAuth' => '4',
+	'calendariCal' => '',
 	'homepagCustomHTMLoneEnabled' => false,
 	'homepagCustomHTMLoneAuth' => '1',
 	'homepagCustomHTMLtwoEnabled' => false,
@@ -101,6 +101,7 @@ return array(
 	'homepageEmbyAuth' => '1',
 	'homepageOmbiEnabled' => false,
 	'homepageOmbiAuth' => '1',
+	'homepageOmbiRequestAuth' => '1',
 	'ombiLimitUser' => false,
 	'ombiRefresh' => '600000',
 	'homepageOrdercustomhtml' => '1',
@@ -146,6 +147,6 @@ return array(
 	'mediaSearch' => false,
 	'mediaSearchType' => '',
 	'mediaSearchAuth' => '1',
-    'registrationPassword' => '',
-    'hideRegistration' => false
+	'registrationPassword' => '',
+	'hideRegistration' => false
 );

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 648 - 648
api/functions/homepage-functions.php


+ 12 - 11
api/functions/organizr-functions.php

@@ -12,8 +12,9 @@ function organizrSpecialSettings()
 				'type' => $GLOBALS['mediaSearchType'],
 			),
 			'ombi' => array(
-				'enabled' => (qualifyRequest($GLOBALS['homepageOmbiAuth']) && $GLOBALS['homepageOmbiEnabled'] == true && $GLOBALS['ssoOmbi'] && isset($_COOKIE['Auth'])) ? true : false,
-				'auth' => (qualifyRequest($GLOBALS['homepageOmbiAuth'])) ? true : false,
+				'enabled' => (qualifyRequest($GLOBALS['homepageOmbiAuth']) && qualifyRequest($GLOBALS['homepageOmbiRequestAuth']) && $GLOBALS['homepageOmbiEnabled'] == true && $GLOBALS['ssoOmbi'] && isset($_COOKIE['Auth'])) ? true : false,
+				'authView' => (qualifyRequest($GLOBALS['homepageOmbiAuth'])) ? true : false,
+				'authRequest' => (qualifyRequest($GLOBALS['homepageOmbiRequestAuth'])) ? true : false,
 				'sso' => ($GLOBALS['ssoOmbi']) ? true : false,
 				'cookie' => (isset($_COOKIE['Auth'])) ? true : false,
 			),
@@ -414,12 +415,12 @@ function getSettingsMain()
 				'label' => 'Registration Password',
 				'value' => $GLOBALS['registrationPassword'],
 			),
-            array(
-                'type' => 'switch',
-                'name' => 'hideRegistration',
-                'label' => 'Hide Registration',
-                'value' => $GLOBALS['hideRegistration']
-            )
+			array(
+				'type' => 'switch',
+				'name' => 'hideRegistration',
+				'label' => 'Hide Registration',
+				'value' => $GLOBALS['hideRegistration']
+			)
 		)
 	);
 }
@@ -893,9 +894,9 @@ function logoOrText()
 
 function showLogin()
 {
-    if ($GLOBALS['hideRegistration'] == false) {
-        return '<p><span lang="en">Don\'t have an account?</span><a href="#" class="text-primary m-l-5 to-register"><b lang="en">Sign Up</b></a></p>';
-    }
+	if ($GLOBALS['hideRegistration'] == false) {
+		return '<p><span lang="en">Don\'t have an account?</span><a href="#" class="text-primary m-l-5 to-register"><b lang="en">Sign Up</b></a></p>';
+	}
 }
 
 function getImages()

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů