본문 바로가기

기술/Mongodb

mongodb create user role

별 짓을 다 한다. 

몽고디비에서 사용자 역할 설정

db.createRole(
   {
     role: "appReadWrite",
     privileges: [
       { 
       		resource: { db: "orange", collection: "" }, 
       		actions: [ "find", "update", "insert", "remove", "collStats", "dbStats", "listIndexes", "listCollections" ] 
		}
     ],
       roles: []
   }
)

 

'기술 > Mongodb' 카테고리의 다른 글

몽고디비 쿼리  (0) 2023.07.06