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 11/* Copyright (C) 2016 NooBaa */
22'use strict' ;
33
4+ const config = require ( '../../config' ) ;
45const NoobaaEvent = require ( '../manage_nsfs/manage_nsfs_events_utils' ) . NoobaaEvent ;
56
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+
611/**
712 * @typedef {{
813 * code?: string,
@@ -327,7 +332,7 @@ ManageCLIError.InvalidBooleanValue = Object.freeze({
327332
328333ManageCLIError . InaccessibleAccountNewBucketsPath = Object . freeze ( {
329334 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` ,
331336 http_code : 400 ,
332337} ) ;
333338
@@ -435,7 +440,7 @@ ManageCLIError.MalformedPolicy = Object.freeze({
435440
436441ManageCLIError . InaccessibleStoragePath = Object . freeze ( {
437442 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` ,
439444 http_code : 400 ,
440445} ) ;
441446
You can’t perform that action at this time.
0 commit comments