mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 02:48:12 +02: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",
|
"name": "wordpress_url_base",
|
||||||
"label": "WordPress API 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
|
"advanced": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -449,6 +449,7 @@ SharedNodePointer DomainGatekeeper::processAssignmentConnectRequest(const NodeCo
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString AUTHENTICATION_ENAABLED = "authentication.enable_oauth2";
|
||||||
const QString AUTHENTICATION_OAUTH2_URL_BASE = "authentication.oauth2_url_base";
|
const QString AUTHENTICATION_OAUTH2_URL_BASE = "authentication.oauth2_url_base";
|
||||||
const QString AUTHENTICATION_WORDPRESS_URL_BASE = "authentication.wordpress_url_base";
|
const QString AUTHENTICATION_WORDPRESS_URL_BASE = "authentication.wordpress_url_base";
|
||||||
const QString MAXIMUM_USER_CAPACITY = "security.maximum_user_capacity";
|
const QString MAXIMUM_USER_CAPACITY = "security.maximum_user_capacity";
|
||||||
|
@ -1216,9 +1217,11 @@ Node::LocalID DomainGatekeeper::findOrCreateLocalID(const QUuid& uuid) {
|
||||||
|
|
||||||
|
|
||||||
bool DomainGatekeeper::domainHasLogin() {
|
bool DomainGatekeeper::domainHasLogin() {
|
||||||
// The domain may have its own users and groups. This is enabled in the server settings by ... #######
|
// The domain may have its own users and groups in a WordPress site.
|
||||||
// ####### TODO: Base on server settings.
|
// ####### TODO: Add checks of any further domain server settings used.
|
||||||
return true;
|
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) {
|
void DomainGatekeeper::requestDomainUser(const QString& username, const QString& accessToken, const QString& refreshToken) {
|
||||||
|
|
Loading…
Reference in a new issue