File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
main/java/com/marklogic/hub/dhs
test/java/com/marklogic/hub/dhs Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 88import com .marklogic .appdeployer .command .alert .DeployAlertRulesCommand ;
99import com .marklogic .appdeployer .command .databases .DeployOtherDatabasesCommand ;
1010import com .marklogic .appdeployer .command .schemas .LoadSchemasCommand ;
11+ import com .marklogic .appdeployer .command .security .DeployPrivilegesCommand ;
1112import com .marklogic .appdeployer .command .security .DeployRolesCommand ;
1213import com .marklogic .appdeployer .command .tasks .DeployScheduledTasksCommand ;
1314import com .marklogic .appdeployer .command .temporal .DeployTemporalAxesCommand ;
@@ -154,6 +155,7 @@ protected void setKnownValuesForDhsDeployment(HubConfig hubConfig) {
154155
155156 protected List <Command > buildCommandsForSecurityAdmin () {
156157 List <Command > commands = new ArrayList <>();
158+ commands .add (new DeployPrivilegesCommand ());
157159 commands .add (new DeployRolesCommand ());
158160 return commands ;
159161 }
Original file line number Diff line number Diff line change 11package com .marklogic .hub .dhs ;
22
33import com .marklogic .appdeployer .command .Command ;
4+ import com .marklogic .appdeployer .command .security .DeployPrivilegesCommand ;
45import com .marklogic .appdeployer .command .security .DeployRolesCommand ;
56import org .junit .jupiter .api .Test ;
67
@@ -14,8 +15,10 @@ public class DeployAsSecurityAdminTest {
1415 @ Test
1516 void buildCommands () {
1617 List <Command > commands = new DhsDeployer ().buildCommandsForSecurityAdmin ();
17- assertEquals (1 , commands .size ());
18- assertTrue (commands .get (0 ) instanceof DeployRolesCommand ,
19- "As of 5.2.0, a data-hub-security-admin can only deploy roles" );
18+ assertEquals (2 , commands .size ());
19+
20+ // As of 5.2.0, a data-hub-security-admin can only deploy roles and privileges
21+ assertTrue (commands .get (0 ) instanceof DeployPrivilegesCommand );
22+ assertTrue (commands .get (1 ) instanceof DeployRolesCommand );
2023 }
2124}
You can’t perform that action at this time.
0 commit comments