summaryrefslogtreecommitdiff
path: root/jstests/auth/lib/commands_lib.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/auth/lib/commands_lib.js')
-rw-r--r--jstests/auth/lib/commands_lib.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 4c0c26e8e7a..a9b2a6960cc 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -371,7 +371,8 @@ var authCommandsLib = {
roles: {
dbAdminAnyDatabase: 1,
root: 1,
- __system: 1
+ __system: 1,
+ restore: 1,
},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["createCollection"]},
@@ -400,7 +401,7 @@ var authCommandsLib = {
testcases: [
{
runOnDb: adminDbName,
- roles: {__system: 1, root: 1},
+ roles: {__system: 1, root: 1, restore: 1},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["createCollection"]},
{resource: {cluster: true}, actions: ["useUUID", "forceUUID", "applyOps"]},
@@ -458,7 +459,8 @@ var authCommandsLib = {
roles: {
dbAdminAnyDatabase: 1,
root: 1,
- __system: 1
+ __system: 1,
+ restore: 1,
},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["dropCollection"]},
@@ -497,7 +499,7 @@ var authCommandsLib = {
testcases: [
{
runOnDb: adminDbName,
- roles: {__system: 1, root: 1},
+ roles: {__system: 1, root: 1, restore: 1},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["dropCollection"]},
{resource: {cluster: true}, actions: ["useUUID", "applyOps"]},
@@ -623,7 +625,7 @@ var authCommandsLib = {
testcases: [
{
runOnDb: adminDbName,
- roles: {__system: 1, root: 1},
+ roles: {__system: 1, root: 1, restore: 1},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["insert"]},
{resource: {cluster: true}, actions: ["applyOps"]},
@@ -659,7 +661,7 @@ var authCommandsLib = {
testcases: [
{
runOnDb: adminDbName,
- roles: {__system: 1, root: 1},
+ roles: {__system: 1, root: 1, restore: 1},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["insert"]},
{resource: {cluster: true}, actions: ["useUUID", "applyOps"]},
@@ -699,7 +701,7 @@ var authCommandsLib = {
// failure.
expectFail: true,
runOnDb: adminDbName,
- roles: {__system: 1, root: 1},
+ roles: {__system: 1, root: 1, restore: 1},
privileges: [
{resource: {db: firstDbName, collection: "x"}, actions: ["insert"]},
{resource: {cluster: true}, actions: ["useUUID", "applyOps"]},