public void writeTransitions(Issue issue, JsonWriter json) {
   json.name("transitions").beginArray();
   if (userSession.isLoggedIn()) {
     for (Transition transition : issueService.listTransitions(issue)) {
       json.value(transition.key());
     }
   }
   json.endArray();
 }
Ejemplo n.º 2
0
 private void writeTransitions(Issue issue, JsonWriter json) {
   json.name("transitions").beginArray();
   if (UserSession.get().isLoggedIn()) {
     List<Transition> transitions = issueService.listTransitions(issue, UserSession.get());
     for (Transition transition : transitions) {
       json.value(transition.key());
     }
   }
   json.endArray();
 }
Ejemplo n.º 3
0
 private void checkTransitionPermission(
     String transitionKey, UserSession userSession, DefaultIssue defaultIssue) {
   List<Transition> outTransitions = workflow.outTransitions(defaultIssue);
   for (Transition transition : outTransitions) {
     String projectKey = defaultIssue.projectKey();
     if (transition.key().equals(transitionKey)
         && StringUtils.isNotBlank(transition.requiredProjectPermission())
         && projectKey != null) {
       userSession.checkComponentPermission(transition.requiredProjectPermission(), projectKey);
     }
   }
 }