Skip to content

Commit

Permalink
Add sla_url and priacy_url
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Feb 25, 2024
1 parent a31404f commit 7bdf073
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
22 changes: 22 additions & 0 deletions src/Config/ConfigInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,28 @@ class ConfigInfo {
*/
public $git_command = false;

/**
* If defined, this is displayed as the privacy URL when Tsugi
* is used as an "App Store". If you want to use Google login,
* you need these URLs available on the OAuth application.
*
* You can see sample wording at:
*
* https://www.py4e.com/service.php
*/
public $privacy_url = false;

/**
* If defined, this is displayed as the SLA URL when Tsugi
* is used as an "App Store". If you want to use Google login,
* you need these URLs available on the OAuth application.
*
* You can see sample wording at:
*
* https://www.py4e.com/service.php
*/
public $sla_url = false;

/**
*
* Tools to hide in the store for non-admin users. Each tool sets their status
Expand Down
10 changes: 5 additions & 5 deletions tests/Util/NetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@
class NetTest extends \PHPUnit\Framework\TestCase
{
public function testGet() {
$stuff = Net::doGet("http://www.dr-chuck.com/page1.htm");
$stuff = Net::doGet("https://www.dr-chuck.com/page1.htm");
$this->assertStringContainsStringIgnoringCase("The First Page",$stuff);
}

public function testGetStream() {
$stuff = Net::getStream("http://www.dr-chuck.com/page1.htm");
$stuff = Net::getStream("https://www.dr-chuck.com/page1.htm");
$this->assertStringContainsStringIgnoringCase("The First Page",$stuff);
}

public function testGetCurl() {
global $LastCurlError;
$stuff = Net::getCurl("http://www.dr-chuck.com/page1.htm");
$stuff = Net::getCurl("https://www.dr-chuck.com/page1.htm");
$this->assertStringContainsStringIgnoringCase("The First Page",$stuff);
$this->assertFalse($LastCurlError);
}

public function testGetCurlFail() {
global $LastCurlError;
// Wow - AT&T fakes a domain response - Thanks AT&T
$stuff = Net::getCurl("http://fail.lkdfjdfljfdlj1298.com/page1.htm");
$stuff = Net::getCurl("https://fail.lkdfjdfljfdlj1298.com/page1.htm");
$this->assertTrue(is_string($LastCurlError));
}

public function testGetIP() {
$stuff = Net::getIP("http://www.dr-chuck.com/page1.htm");
$stuff = Net::getIP("https://www.dr-chuck.com/page1.htm");
$this->assertNull($stuff);
}

Expand Down

0 comments on commit 7bdf073

Please sign in to comment.