Skip to content

Commit

Permalink
The server administrator should set fewer items.
Browse files Browse the repository at this point in the history
The oauth icon is excluded from setting items because there is no flexibility in adding to setting items.
  • Loading branch information
Tadayuki Onishi committed Sep 18, 2019
1 parent 7d47278 commit 35e3fcc
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@
// $tlCfg->OAuthServers[1]['oauth_name'] = 'google';

// Get from /gui/themes/default/images
// $tlCfg->OAuthServers[1]['oauth_icon'] = 'google.png';
// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
Expand All @@ -482,7 +481,6 @@
// Github
// $tlCfg->OAuthServers[2]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[2]['oauth_name'] = 'github';
// $tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png'; //Get from /gui/themes/default/images
// $tlCfg->OAuthServers[2]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[2]['oauth_client_secret'] = 'CLIENT_SECRET';

Expand All @@ -499,7 +497,6 @@
//Microsoft
//$tlCfg->OAuthServers[1]['oauth_enabled'] = true;
//$tlCfg->OAuthServers[1]['oauth_name'] = 'microsoft';
//$tlCfg->OAuthServers[1]['oauth_icon'] = 'mslogo.jpg';
//$tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
//$tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';

Expand All @@ -522,7 +519,6 @@

// $tlCfg->OAuthServers[1]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[1]['oauth_name'] = 'azuread'; //do not change this
// $tlCfg->OAuthServers[1]['oauth_icon'] = 'azuread.png';

// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
Expand Down
2 changes: 0 additions & 2 deletions custom_config.inc.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
// $tlCfg->authentication['oauth'][1]['oauth_name'] = 'google';

// Get from /gui/themes/default/images
// $tlCfg->authentication['oauth'][1]['oauth_icon'] = 'google.png';
// $tlCfg->authentication['oauth'][1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->authentication['oauth'][1]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
Expand All @@ -111,7 +110,6 @@
// Github
// $tlCfg->authentication['oauth'][2]['oauth_enabled'] = true;
// $tlCfg->authentication['oauth'][2]['oauth_name'] = 'github';
// $tlCfg->authentication['oauth'][2]['oauth_icon'] = 'github.png'; //Get from /gui/themes/default/images
// $tlCfg->authentication['oauth'][2]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->authentication['oauth'][2]['oauth_client_secret'] = 'CLIENT_SECRET';

Expand Down
1 change: 0 additions & 1 deletion custom_config.inc.php.example.github_oauth
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# ngrok http -region eu -subdomain=testlink 80
$tlCfg->OAuthServers[2]['oauth_enabled'] = true;
$tlCfg->OAuthServers[2]['oauth_name'] = 'github';
$tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png';

$tlCfg->OAuthServers[2]['oauth_client_id'] = '98e37f6f3f91602e9538';
$tlCfg->OAuthServers[2]['oauth_client_secret'] = 'b66f036df4210af08a5d7b7fbf564e731e0ff189';
Expand Down
1 change: 0 additions & 1 deletion custom_config.inc.php.github.testlinkOauthProvider
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ $tlCfg->OAuthServers[2]['oauth_client_secret'] =

$tlCfg->OAuthServers[2]['oauth_enabled'] = true;
$tlCfg->OAuthServers[2]['oauth_name'] = 'github';
$tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png';

// Can be authorization_code (by default), client_credentials or password
$tlCfg->OAuthServers[2]['oauth_grant_type'] = 'authorization_code';
Expand Down
1 change: 0 additions & 1 deletion custom_config.inc.php.google_oauth
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// $tlCfg->authentication['oauth'][1]['oauth_name'] = 'google';

// Get from /gui/themes/default/images
// $tlCfg->authentication['oauth'][1]['oauth_icon'] = 'google.png';
// Can be authorization_code (by default), client_credentials or password
// $tlCfg->authentication['oauth'][1]['oauth_grant_type'] = 'authorization_code';
// $tlCfg->authentication['oauth'][1]['oauth_url'] = 'https://accounts.google.com/o/oauth2/auth';
Expand Down
Binary file added gui/themes/default/images/microsoft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gui/themes/default/images/mslogo.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion login.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function init_gui(&$db,$args) {
$gui->oauth[$name] = new stdClass();
$gui->oauth[$name]->name = ucfirst($name);
$gui->oauth[$name]->link = oauth_link($oauth_prov);
$gui->oauth[$name]->icon = $oauth_prov['oauth_icon'];
$gui->oauth[$name]->icon = $name . '.png';
}
}

Expand Down
2 changes: 1 addition & 1 deletion microsoftoauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function init_gui(&$db,$args)
$gui->oauth[$name] = new stdClass();
$gui->oauth[$name]->name = ucfirst($name);
$gui->oauth[$name]->link = oauth_link($oauth_prov);
$gui->oauth[$name]->icon = $oauth_prov['oauth_icon'];
$gui->oauth[$name]->icon = $name . '.png';
}
}
$gui->external_password_mgmt = false;
Expand Down

0 comments on commit 35e3fcc

Please sign in to comment.