diff options
Diffstat (limited to 'jstests/auth/role_management_commands.js')
-rw-r--r-- | jstests/auth/role_management_commands.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/jstests/auth/role_management_commands.js b/jstests/auth/role_management_commands.js index 9847818e3b1..af2f7709bf1 100644 --- a/jstests/auth/role_management_commands.js +++ b/jstests/auth/role_management_commands.js @@ -180,12 +180,10 @@ function runTest(conn) { (function testGrantPrivilegesToRole() { jsTestLog("Testing grantPrivilegesToRole"); - adminUserAdmin.grantPrivilegesToRole( - 'adminRole', - [ - {resource: {cluster: true}, actions: ['serverStatus']}, - {resource: {db: "", collection: ""}, actions: ['find']} - ]); + adminUserAdmin.grantPrivilegesToRole('adminRole', [ + {resource: {cluster: true}, actions: ['serverStatus']}, + {resource: {db: "", collection: ""}, actions: ['find']} + ]); assert.doesNotThrow(function() { db.foo.findOne(); }); @@ -197,12 +195,10 @@ function runTest(conn) { assert.commandWorked(db.adminCommand('serverStatus')); testUserAdmin.updateUser('testUser', {roles: ['testRole2']}); - testUserAdmin.grantPrivilegesToRole( - 'testRole2', - [ - {resource: {db: 'test', collection: ''}, actions: ['insert', 'update']}, - {resource: {db: 'test', collection: 'foo'}, actions: ['find']} - ]); + testUserAdmin.grantPrivilegesToRole('testRole2', [ + {resource: {db: 'test', collection: ''}, actions: ['insert', 'update']}, + {resource: {db: 'test', collection: 'foo'}, actions: ['find']} + ]); assert.doesNotThrow(function() { db.foo.findOne(); }); @@ -219,7 +215,7 @@ function runTest(conn) { testUserAdmin.revokePrivilegesFromRole( 'testRole2', - [{resource: {db: 'test', collection: ''}, actions: ['insert', 'update', 'find']}]); + [{resource: {db: 'test', collection: ''}, actions: ['insert', 'update', 'find']}]); assert.doesNotThrow(function() { db.foo.findOne(); }); |