set file permissions on the config.json file for the domain server

This commit is contained in:
Roxanne Skelly 2019-09-11 16:27:00 -07:00
parent 4a4f86db3f
commit 9a7de10614
3 changed files with 3 additions and 4 deletions

View file

@ -91,7 +91,6 @@ $(document).ready(function(){
// make a JSON request to get the dropdown menus for content and settings // make a JSON request to get the dropdown menus for content and settings
// we don't error handle here because the top level menu is still clickable and usables if this fails // we don't error handle here because the top level menu is still clickable and usables if this fails
$.getJSON('/settings-menu-groups.json', function(data){ $.getJSON('/settings-menu-groups.json', function(data){
function makeGroupDropdownElement(group, base) { function makeGroupDropdownElement(group, base) {
var html_id = group.html_id ? group.html_id : group.name; var html_id = group.html_id ? group.html_id : group.name;
return "<li class='setting-group'><a href='" + settingsGroupAnchor(base, html_id) + "'>" + group.label + "<span class='badge'></span></a></li>"; return "<li class='setting-group'><a href='" + settingsGroupAnchor(base, html_id) + "'>" + group.label + "<span class='badge'></span></a></li>";

View file

@ -2718,7 +2718,7 @@ std::pair<bool, QString> DomainServer::isAuthenticatedRequest(HTTPConnection* c
QString cookieString = connection->requestHeader(HTTP_COOKIE_HEADER_KEY); QString cookieString = connection->requestHeader(HTTP_COOKIE_HEADER_KEY);
QRegExp cookieUUIDRegex(COOKIE_UUID_REGEX_STRING); QRegExp cookieUUIDRegex(COOKIE_UUID_REGEX_STRING);
QUuid cookieUUID; QUuid cookieUUID;
if (cookieString.indexOf(cookieUUIDRegex) != -1) { if (cookieString.indexOf(cookieUUIDRegex) != -1) {
cookieUUID = cookieUUIDRegex.cap(1); cookieUUID = cookieUUIDRegex.cap(1);

View file

@ -1535,7 +1535,6 @@ QJsonObject DomainServerSettingsManager::settingsResponseObjectForType(const QSt
} }
if (!groupKey.isEmpty() && !groupResponseObject.isEmpty()) { if (!groupKey.isEmpty() && !groupResponseObject.isEmpty()) {
// set this group's object to the constructed object // set this group's object to the constructed object
responseObject[groupKey] = groupResponseObject; responseObject[groupKey] = groupResponseObject;
} }
@ -1728,7 +1727,6 @@ bool DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
postedObject[OAUTH_ROOT_KEY] = oauthObject; postedObject[OAUTH_ROOT_KEY] = oauthObject;
qDebug() << postedObject;
// Iterate on the setting groups // Iterate on the setting groups
foreach(const QString& rootKey, postedObject.keys()) { foreach(const QString& rootKey, postedObject.keys()) {
const QJsonValue& rootValue = postedObject[rootKey]; const QJsonValue& rootValue = postedObject[rootKey];
@ -1913,6 +1911,8 @@ void DomainServerSettingsManager::persistToFile() {
_configMap.loadConfig(); _configMap.loadConfig();
return; // defend against future code return; // defend against future code
} }
QFile(settingsFilename).setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner);
} }
QStringList DomainServerSettingsManager::getAllKnownGroupNames() { QStringList DomainServerSettingsManager::getAllKnownGroupNames() {