Closed imtrobin closed 5 years ago
@imtrobin operations like CreateDatabase
needs system privilege. these operation use SystemDatabaseCredential
and other use DatabaseCredential
. i separate credentials so end-users can set limited-access-user (not root) for regular operations.
Yes, I assume so. Is there a list we can check? Cos it seems insert a document also needs SystemDatabaseCredential, which I found it odd.
@imtrobin note that when SystemDatabaseCredential
is used in an operation(like creating database), all request will be use _system
, so inserting document should not use SystemDatabaseCredential
, if it is, its a bug
I did some more testing. I confirm
Is that correct?
@imtrobin absolutely. for more clarification:
_system
database. only _system
can create database.Creating collection do not need SystemCredential, just Credential because it is perform on the database which is set on DatabaseSetting.Database
which credentials are set on DatabaseSetting.Credential
Hi, I'm abit confused with what SystemDatabaseCredential is for, I did some testing, some functions like CreateDatabaseAsync needs it , while others like ListAccessibleDatabasesAsync needs Credential. Is there a doc or something we can reference?