1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-06-09 23:56:48 +02:00
Files
Vitaly the Alpaca (bot) aeb4d14a82 Main build (Jenkins)
2026-02-13 14:09:07 +03:00

27 lines
860 B
Plaintext
Vendored

Address = "127.0.0.1:1234";
Login = "bayselonarrend";
Password = "12we...";
Base = "admin";
ConnectionParams = New Structure("authSource", "admin");
ConnectionString = OPI_MongoDB.GenerateConnectionString(Address, , Login, Password, ConnectionParams);
Connection = OPI_MongoDB.CreateConnection(ConnectionString);
RoleArray = New Array;
RoleArray.Add("read");
RoleArray.Add("userAdmin");
Resource = New Structure("db,collection", Base, "new_collection2");
Actions = New Array;
Actions.Add("find");
Actions.Add("insert");
Privilege = OPI_MongoDB.GetRolePrivilegeStructure(Resource, Actions);
PrivilegesArray = New Array;
PrivilegesArray.Add(Privilege);
RoleName = "newrole";
Result = OPI_MongoDB.UpdateRole(Connection, RoleName, Base, PrivilegesArray, RoleArray);