File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ jest.setTimeout(JEST_TIMEOUT);
1212
1313let client : dgraph . DgraphClient ;
1414
15- const GROOT_PWD = "password" ;
15+ const GUARDIAN_CREDS = "user=groot; password=password;namespace=0 " ;
1616const USERID = "alice" ;
1717const USERPWD = "alicepassword" ;
1818const PRED = "name" ;
@@ -71,22 +71,22 @@ async function aclSetup() {
7171}
7272
7373async function addUser ( ) {
74- const command = `dgraph acl -a ${ SERVER_ADDR } add -u ${ USERID } -p ${ USERPWD } -x ${ GROOT_PWD } ` ;
74+ const command = `dgraph acl -a ${ SERVER_ADDR } add -u ${ USERID } -p ${ USERPWD } --guardian-creds ${ GUARDIAN_CREDS } ` ;
7575 await cmd ( command ) ;
7676}
7777
7878async function addGroup ( ) {
79- const command = `dgraph acl -a ${ SERVER_ADDR } add -g ${ DEV_GROUP } -x ${ GROOT_PWD } ` ;
79+ const command = `dgraph acl -a ${ SERVER_ADDR } add -g ${ DEV_GROUP } --guardian-creds ${ GUARDIAN_CREDS } ` ;
8080 await cmd ( command ) ;
8181}
8282
8383async function addUserToGroup ( ) {
84- const command = `dgraph acl -a ${ SERVER_ADDR } mod -u ${ USERID } -l ${ DEV_GROUP } -x ${ GROOT_PWD } ` ;
84+ const command = `dgraph acl -a ${ SERVER_ADDR } mod -u ${ USERID } -l ${ DEV_GROUP } --guardian-creds ${ GUARDIAN_CREDS } ` ;
8585 await cmd ( command ) ;
8686}
8787
8888async function changePermission ( permission : number ) {
89- const command = `dgraph acl -a ${ SERVER_ADDR } mod -g ${ DEV_GROUP } -p ${ PRED } -m ${ permission } -x ${ GROOT_PWD } ` ;
89+ const command = `dgraph acl -a ${ SERVER_ADDR } mod -g ${ DEV_GROUP } -p ${ PRED } -m ${ permission } ---guardian-creds ${ GUARDIAN_CREDS } ` ;
9090 await cmd ( command ) ;
9191 await wait ( WAIT_FOR_SIX_SECONDS ) ;
9292}
You can’t perform that action at this time.
0 commit comments