aboutsummaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-12-12 16:53:13 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-01-08 17:37:14 +0100
commit3d4c4f19b4061be862ada764f453a3fdd035e1fb (patch)
treed05dda98044be979a6478c0b262792ddc5eec7c1 /core/js
parentadfe883102f69cf1f5a05a3d6bb3616e81a4609f (diff)
downloadnextcloud-server-3d4c4f19b4061be862ada764f453a3fdd035e1fb.tar.gz
nextcloud-server-3d4c4f19b4061be862ada764f453a3fdd035e1fb.zip
Migrate app dir owner check to SetupCheck API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/setupchecks.js15
-rw-r--r--core/js/tests/specs/setupchecksSpec.js63
2 files changed, 0 insertions, 78 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index e85f32dae4a..4331e8e9cc9 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -271,21 +271,6 @@
})
}
- if(data.appDirsWithDifferentOwner && data.appDirsWithDifferentOwner.length > 0) {
- var appDirsWithDifferentOwner = data.appDirsWithDifferentOwner.reduce(
- function(appDirsWithDifferentOwner, directory) {
- return appDirsWithDifferentOwner + '<li>' + directory + '</li>';
- },
- ''
- );
- messages.push({
- msg: t('core', 'Some app directories are owned by a different user than the web server one. ' +
- 'This may be the case if apps have been installed manually. ' +
- 'Check the permissions of the following app directories:')
- + '<ul>' + appDirsWithDifferentOwner + '</ul>',
- type: OC.SetupChecks.MESSAGE_TYPE_WARNING
- });
- }
if (data.isMysqlUsedWithoutUTF8MB4) {
messages.push({
msg: t('core', 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read {linkstart}the documentation page about this ↗{linkend}.')
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index bb7d118fc52..594b9ca39bc 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -232,7 +232,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -280,7 +279,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -328,7 +326,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -376,7 +373,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -404,54 +400,6 @@ describe('OC.SetupChecks tests', function() {
});
});
- it('should return a warning if there are app directories with wrong permissions', function(done) {
- var async = OC.SetupChecks.checkSetup();
-
- suite.server.requests[0].respond(
- 200,
- {
- 'Content-Type': 'application/json',
- },
- JSON.stringify({
- suggestedOverwriteCliURL: '',
- isFairUseOfFreePushService: true,
- isCorrectMemcachedPHPModuleInstalled: true,
- hasPassedCodeIntegrityCheck: true,
- isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
- appDirsWithDifferentOwner: [
- '/some/path'
- ],
- isImagickEnabled: true,
- areWebauthnExtensionsEnabled: true,
- isMysqlUsedWithoutUTF8MB4: false,
- isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
- reverseProxyGeneratedURL: 'https://server',
- temporaryDirectoryWritable: true,
- generic: {
- network: {
- "Internet connectivity": {
- severity: "success",
- description: null,
- linkToDoc: null
- }
- },
- },
- })
- );
-
- async.done(function( data, s, x ){
- expect(data).toEqual([{
- msg: 'Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:<ul><li>/some/path</li></ul>',
- type: OC.SetupChecks.MESSAGE_TYPE_WARNING
- }]);
- done();
- });
- });
-
it('should return an error if set_time_limit is unavailable', function(done) {
var async = OC.SetupChecks.checkSetup();
@@ -471,7 +419,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -518,7 +465,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -596,7 +542,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -649,7 +594,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: true,
@@ -699,7 +643,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -746,7 +689,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -790,7 +732,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -837,7 +778,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: false,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -884,7 +824,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: false,
isMysqlUsedWithoutUTF8MB4: false,
@@ -930,7 +869,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
@@ -983,7 +921,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,