summaryrefslogtreecommitdiff
path: root/jstests/auth/user_management_commands.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/auth/user_management_commands.js')
-rw-r--r--jstests/auth/user_management_commands.js27
1 files changed, 12 insertions, 15 deletions
diff --git a/jstests/auth/user_management_commands.js b/jstests/auth/user_management_commands.js
index e835aa4b348..a5cca448576 100644
--- a/jstests/auth/user_management_commands.js
+++ b/jstests/auth/user_management_commands.js
@@ -113,14 +113,13 @@ function runTest(conn) {
assert.commandFailedWithCode(db.runCommand({collMod: 'foo', usePowerOf2Sizes: true}),
authzErrorCode);
- testUserAdmin.grantRolesToUser('spencer',
- [
- 'readWrite',
- 'dbAdmin',
- {role: 'readWrite', db: 'test'},
- {role: 'testRole', db: 'test'},
- 'readWrite'
- ]);
+ testUserAdmin.grantRolesToUser('spencer', [
+ 'readWrite',
+ 'dbAdmin',
+ {role: 'readWrite', db: 'test'},
+ {role: 'testRole', db: 'test'},
+ 'readWrite'
+ ]);
assert.commandWorked(db.runCommand({collMod: 'foo', usePowerOf2Sizes: true}));
assert.writeOK(db.foo.update({}, {$inc: {a: 1}}));
@@ -135,13 +134,11 @@ function runTest(conn) {
(function testRevokeRolesFromUser() {
jsTestLog("Testing revokeRolesFromUser");
- testUserAdmin.revokeRolesFromUser(
- 'spencer',
- [
- 'readWrite',
- {role: 'dbAdmin', db: 'test2'}, // role user doesnt have
- "testRole"
- ]);
+ testUserAdmin.revokeRolesFromUser('spencer', [
+ 'readWrite',
+ {role: 'dbAdmin', db: 'test2'}, // role user doesnt have
+ "testRole"
+ ]);
assert.commandWorked(db.runCommand({collMod: 'foo', usePowerOf2Sizes: true}));
hasAuthzError(db.foo.update({}, {$inc: {a: 1}}));