Last active
January 15, 2019 07:50
-
-
Save sarjarapu/36add7806445dd9dc7adbffedb9bbcef to your computer and use it in GitHub Desktop.
The MongoDB getRole command to show all the granted actions for readWrite role
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// command to get readWrite privileges | |
db.getRole( "readWrite", { showPrivileges: true } ).privileges[0].actions | |
// output of above command | |
/* | |
[ | |
"changeStream", | |
"collStats", | |
"convertToCapped", | |
"createCollection", | |
"createIndex", | |
"dbHash", | |
"dbStats", | |
"dropCollection", | |
"dropIndex", | |
"emptycapped", | |
"find", | |
"insert", | |
"killCursors", | |
"listCollections", | |
"listIndexes", | |
"planCacheRead", | |
"remove", | |
"renameCollectionSameDB", | |
"update" | |
] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment