//JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario().WithoutAuthorizations()
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, PROCESS_DEFINITION_KEY, "userId", Permissions.Delete)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessDefinition, PROCESS_DEFINITION_KEY, "userId", Permissions.Delete)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessDefinition, "*", "userId", Permissions.Delete)).Succeeds()));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario().WithoutAuthorizations()
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.Batch, "batchId", "userId", Permissions.Delete)),
                                               AuthorizationScenario.Scenario()
                                               .WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "batchId", "userId", Permissions.Delete)).Succeeds()));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario()
                                               .WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                   AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read))
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, "sourceDefinitionKey", "userId", Permissions.MigrateInstance),
                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "targetDefinitionKey", "userId", Permissions.MigrateInstance)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "sourceDefinitionKey", "userId", Permissions.MigrateInstance))
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, "sourceDefinitionKey", "userId", Permissions.MigrateInstance),
                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "targetDefinitionKey", "userId", Permissions.MigrateInstance)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "targetDefinitionKey", "userId", Permissions.MigrateInstance))
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, "sourceDefinitionKey", "userId", Permissions.MigrateInstance),
                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "targetDefinitionKey", "userId", Permissions.MigrateInstance)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "sourceDefinitionKey", "userId", Permissions.MigrateInstance),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "targetDefinitionKey", "userId", Permissions.MigrateInstance)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read),
                                                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "*", "userId", Permissions.MigrateInstance)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance", "userId", Permissions.Read))
                                               .FailsDueToRequired(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create))));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenarioWithCount.scenario().withCount(2L)
                                               .WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process_1", "userId", Permissions.ReadHistory, Permissions.DeleteHistory),
                                                                   AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process_2", "userId", Permissions.ReadHistory)).FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process_2", "userId", Permissions.DeleteHistory)), AuthorizationScenarioWithCount.scenario().withCount(0L).WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                                                                                                                                                                                                                                                                                                AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process_1", "userId", Permissions.ReadHistory, Permissions.DeleteHistory),
                                                                                                                                                                                                                                                                                                                                                                                AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process_2", "userId", Permissions.ReadHistory, Permissions.DeleteHistory)).Succeeds()));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario().WithoutAuthorizations().FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessInstance, "ProcessInstanceId", "userId", Permissions.Update),
                                                                                                                           AuthorizationSpec.Grant(Resources.ProcessDefinition, "oneExternalTaskProcess", "userId", Permissions.UpdateInstance)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessInstance, "ProcessInstanceId", "userId", Permissions.Update)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessInstance, "*", "userId", Permissions.Update)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessDefinition, "processDefinitionKey", "userId", Permissions.UpdateInstance)).Succeeds(),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessDefinition, "*", "userId", Permissions.UpdateInstance)).Succeeds()));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenarioWithCount.scenario().withCount(3).WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                                         AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance1", "userId", Permissions.Read, Permissions.Update),
                                                                                                                         AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.Read)).FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.Update),
                                                                                                                                                                                                                                                AuthorizationSpec.Grant(Resources.ProcessDefinition, "exceptionInJobExecution", "userId", Permissions.UpdateInstance)), AuthorizationScenarioWithCount.scenario().withCount(5).WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                                                                                                                                                                                                                                                                                                                                                                  AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance1", "userId", Permissions.All),
                                                                                                                                                                                                                                                                                                                                                                                                                                                  AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.All)).Succeeds(), AuthorizationScenarioWithCount.scenario().withCount(5).WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "*", "userId", Permissions.Create),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process", "userId", Permissions.ReadInstance, Permissions.UpdateInstance)).Succeeds()));
 }
Пример #7
0
//JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
        public static ICollection <AuthorizationScenario[]> scenarios()
        {
            return(AuthorizationTestRule.AsParameters(scenario
                                                      .FailsDueToRequired(AuthorizationSpec.Grant(Resources.DecisionDefinition, "*", "demo",
                                                                                                  Permissions.DeleteHistory)),
                                                      scenario
                                                      .WithAuthorizations(AuthorizationSpec.Grant(Resources.DecisionDefinition, "someId", "demo",
                                                                                                  Permissions.DeleteHistory))
                                                      .FailsDueToRequired(AuthorizationSpec.Grant(Resources.DecisionDefinition, "*", "demo",
                                                                                                  Permissions.DeleteHistory)),
                                                      scenario
                                                      .WithAuthorizations(AuthorizationSpec.Grant(Resources.DecisionDefinition, "*", "demo",
                                                                                                  Permissions.DeleteHistory))
                                                      .Succeeds()));
        }
Пример #8
0
//JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
        public static ICollection <AuthorizationScenario[]> scenarios()
        {
            return(AuthorizationTestRule.AsParameters(scenario
                                                      .WithoutAuthorizations()
                                                      .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process", "userId",
                                                                                                  Permissions.ReadHistory)),
                                                      scenario
                                                      .WithAuthorizations(AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process", "userId",
                                                                                                  Permissions.ReadHistory))
                                                      .FailsDueToRequired(AuthorizationSpec.Grant(Resources.ProcessInstance, "*", "userId",
                                                                                                  Permissions.Create)), scenario
                                                      .WithAuthorizations(
                                                          AuthorizationSpec.Grant(Resources.ProcessDefinition, "Process", "userId",
                                                                                  Permissions.ReadHistory,
                                                                                  Permissions.CreateInstance),
                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "*", "userId", Permissions.Create))
                                                      .Succeeds()));
        }
Пример #9
0
//JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
        public static ICollection <AuthorizationScenario[]> scenarios()
        {
            return(AuthorizationTestRule.AsParameters(scenario
                                                      .WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "batchId", "userId", Permissions.Create),
                                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance1", "userId", Permissions.Read,
                                                                                                  Permissions.Update),
                                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.Read,
                                                                                                  Permissions.Update))
                                                      .Succeeds(), scenario
                                                      .WithAuthorizations(AuthorizationSpec.Grant(Resources.Batch, "batchId", "userId", Permissions.Create),
                                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance1", "userId", Permissions.Read,
                                                                                                  Permissions.Update),
                                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.Read))
                                                      .FailsDueToRequired(
                                                          AuthorizationSpec.Grant(Resources.ProcessInstance, "processInstance2", "userId", Permissions.Update),
                                                          AuthorizationSpec.Grant(Resources.ProcessDefinition, "processDefinition", "userId",
                                                                                  Permissions.UpdateInstance))
                                                      .Succeeds()));
        }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameterized.Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario()
                                               .WithoutAuthorizations().FailsDueToRequired(AuthorizationSpec.Grant(Resources.DecisionRequirementsDefinition, "dish", "userId", Permissions.Read)), AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.DecisionRequirementsDefinition, "drd", "userId", Permissions.Read)).Succeeds()));
 }
 //JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
 //ORIGINAL LINE: @Parameters(name = "Scenario {index}") public static java.util.Collection<api.authorization.util.AuthorizationScenario[]> scenarios()
 public static ICollection <AuthorizationScenario[]> scenarios()
 {
     return(AuthorizationTestRule.AsParameters(AuthorizationScenario.Scenario().WithoutAuthorizations().FailsDueToRequired(AuthorizationSpec.Grant(Resources.Deployment, "*", "userId", Permissions.Create)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Deployment, "*", "userId", Permissions.Create)).FailsDueToRequired(AuthorizationSpec.Grant(Resources.Deployment, "deploymentId", "userId", Permissions.Read)),
                                               AuthorizationScenario.Scenario().WithAuthorizations(AuthorizationSpec.Grant(Resources.Deployment, "deploymentId", "userId", Permissions.Read), AuthorizationSpec.Grant(Resources.Deployment, "*", "userId", Permissions.Create)).Succeeds()));
 }