mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Use "enable domain authentication" server setting
This commit is contained in:
parent
fdb4a5605a
commit
dfbad4efc0
2 changed files with 7 additions and 4 deletions
|
@ -93,7 +93,7 @@
|
|||
{
|
||||
"name": "wordpress_url_base",
|
||||
"label": "WordPress API URL Base",
|
||||
"help": "The URL base that the domain server will use to make WordPress API calls. Typically \"http://oursite.com/wp-json/\". However, if using non-pretty permalinks or otherwise get a 404 error then use \"http://oursite.com/?rest_route=/\".",
|
||||
"help": "The URL base that the domain server will use to make WordPress API calls. Typically \"https://oursite.com/wp-json/\". However, if using non-pretty permalinks or otherwise get a 404 error then try \"https://oursite.com/?rest_route=/\".",
|
||||
"advanced": true
|
||||
}
|
||||
]
|
||||
|
|
|
@ -449,6 +449,7 @@ SharedNodePointer DomainGatekeeper::processAssignmentConnectRequest(const NodeCo
|
|||
return newNode;
|
||||
}
|
||||
|
||||
const QString AUTHENTICATION_ENAABLED = "authentication.enable_oauth2";
|
||||
const QString AUTHENTICATION_OAUTH2_URL_BASE = "authentication.oauth2_url_base";
|
||||
const QString AUTHENTICATION_WORDPRESS_URL_BASE = "authentication.wordpress_url_base";
|
||||
const QString MAXIMUM_USER_CAPACITY = "security.maximum_user_capacity";
|
||||
|
@ -1216,9 +1217,11 @@ Node::LocalID DomainGatekeeper::findOrCreateLocalID(const QUuid& uuid) {
|
|||
|
||||
|
||||
bool DomainGatekeeper::domainHasLogin() {
|
||||
// The domain may have its own users and groups. This is enabled in the server settings by ... #######
|
||||
// ####### TODO: Base on server settings.
|
||||
return true;
|
||||
// The domain may have its own users and groups in a WordPress site.
|
||||
// ####### TODO: Add checks of any further domain server settings used.
|
||||
return _server->_settingsManager.valueForKeyPath(AUTHENTICATION_ENAABLED).toBool()
|
||||
&& !_server->_settingsManager.valueForKeyPath(AUTHENTICATION_OAUTH2_URL_BASE).toString().isEmpty()
|
||||
&& !_server->_settingsManager.valueForKeyPath(AUTHENTICATION_WORDPRESS_URL_BASE).toString().isEmpty();
|
||||
}
|
||||
|
||||
void DomainGatekeeper::requestDomainUser(const QString& username, const QString& accessToken, const QString& refreshToken) {
|
||||
|
|
Loading…
Reference in a new issue