mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
change message when permissions to replace domain content are not present
This commit is contained in:
parent
8d21b286b4
commit
7eab80e494
1 changed files with 4 additions and 2 deletions
|
@ -6320,11 +6320,11 @@ bool Application::askToWearAvatarAttachmentUrl(const QString& url) {
|
||||||
|
|
||||||
bool Application::askToReplaceDomainContent(const QString& url) {
|
bool Application::askToReplaceDomainContent(const QString& url) {
|
||||||
QString methodDetails;
|
QString methodDetails;
|
||||||
|
const int MAX_CHARACTERS_PER_LINE = 90;
|
||||||
if (DependencyManager::get<NodeList>()->getThisNodeCanReplaceContent()) {
|
if (DependencyManager::get<NodeList>()->getThisNodeCanReplaceContent()) {
|
||||||
QUrl originURL { url };
|
QUrl originURL { url };
|
||||||
if (originURL.host().endsWith(MARKETPLACE_CDN_HOSTNAME)) {
|
if (originURL.host().endsWith(MARKETPLACE_CDN_HOSTNAME)) {
|
||||||
// Create a confirmation dialog when this call is made
|
// Create a confirmation dialog when this call is made
|
||||||
const int MAX_CHARACTERS_PER_LINE = 90;
|
|
||||||
static const QString infoText = simpleWordWrap("Your domain's content will be replaced with a new content set. "
|
static const QString infoText = simpleWordWrap("Your domain's content will be replaced with a new content set. "
|
||||||
"If you want to save what you have now, create a backup before proceeding. For more information about backing up "
|
"If you want to save what you have now, create a backup before proceeding. For more information about backing up "
|
||||||
"and restoring content, visit the documentation page at: ", MAX_CHARACTERS_PER_LINE) +
|
"and restoring content, visit the documentation page at: ", MAX_CHARACTERS_PER_LINE) +
|
||||||
|
@ -6360,7 +6360,9 @@ bool Application::askToReplaceDomainContent(const QString& url) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
methodDetails = "UserDoesNotHavePermissionToReplaceContent";
|
methodDetails = "UserDoesNotHavePermissionToReplaceContent";
|
||||||
OffscreenUi::warning("You do not have permissions to replace domain content", "Enable 'Replace Content' in the domain server settings to continue.",
|
static const QString warningMessage = simpleWordWrap("The domain owner must enable 'Replace Content' "
|
||||||
|
"permissions for you in this domain's server settings before you can continue.", MAX_CHARACTERS_PER_LINE);
|
||||||
|
OffscreenUi::warning("You do not have permissions to replace domain content", warningMessage,
|
||||||
QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::Ok, QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
QJsonObject messageProperties = {
|
QJsonObject messageProperties = {
|
||||||
|
|
Loading…
Reference in a new issue