File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* Copyright (C) 2016 NooBaa */
2
2
'use strict' ;
3
3
4
+ const config = require ( '../../config' ) ;
4
5
const NoobaaEvent = require ( '../manage_nsfs/manage_nsfs_events_utils' ) . NoobaaEvent ;
5
6
7
+ // by default NC_DISABLE_POSIX_MODE_ACCESS_CHECK=true, therefore CLI access check of account/bucket will be based on stat (open file)
8
+ // which checks only read permissions.
9
+ const CLI_ACCESS_CHECK_PERMISSIONS = config . NC_DISABLE_POSIX_MODE_ACCESS_CHECK ? 'read' : 'read & write' ;
10
+
6
11
/**
7
12
* @typedef {{
8
13
* code?: string,
@@ -327,7 +332,7 @@ ManageCLIError.InvalidBooleanValue = Object.freeze({
327
332
328
333
ManageCLIError . InaccessibleAccountNewBucketsPath = Object . freeze ( {
329
334
code : 'InaccessibleAccountNewBucketsPath' ,
330
- message : ' Account should have read & write access to the specified new_buckets_path' ,
335
+ message : ` Account should have ${ CLI_ACCESS_CHECK_PERMISSIONS } access to the specified new_buckets_path` ,
331
336
http_code : 400 ,
332
337
} ) ;
333
338
@@ -435,7 +440,7 @@ ManageCLIError.MalformedPolicy = Object.freeze({
435
440
436
441
ManageCLIError . InaccessibleStoragePath = Object . freeze ( {
437
442
code : 'InaccessibleStoragePath' ,
438
- message : ' Bucket owner should have read & write access to the specified bucket storage path' ,
443
+ message : ` Bucket owner should have ${ CLI_ACCESS_CHECK_PERMISSIONS } access to the specified bucket storage path` ,
439
444
http_code : 400 ,
440
445
} ) ;
441
446
You can’t perform that action at this time.
0 commit comments