\r
import com.gitblit.Constants;\r
import com.gitblit.Constants.AccessPermission;\r
+import com.gitblit.Constants.AuthorizationControl;\r
import com.gitblit.models.RegistrantAccessPermission;\r
import com.gitblit.models.TicketModel;\r
import com.gitblit.models.TicketModel.Change;\r
// responsible\r
Set<String> userlist = new TreeSet<String>(ticket.getParticipants());\r
\r
- if (UserModel.ANONYMOUS.canPush(getRepositoryModel())) {\r
- // anonymous push\r
+ if (UserModel.ANONYMOUS.canPush(getRepositoryModel())\r
+ || AuthorizationControl.AUTHENTICATED == getRepositoryModel().authorizationControl) {\r
+ // authorization is ANONYMOUS or AUTHENTICATED (i.e. all users can be set responsible)\r
userlist.addAll(app().users().getAllUsernames());\r
} else {\r
- // authenticated push\r
+ // authorization is by NAMED users (users with PUSH permission can be set responsible)\r
for (RegistrantAccessPermission rp : app().repositories().getUserAccessPermissions(getRepositoryModel())) {\r
if (rp.permission.atLeast(AccessPermission.PUSH) && !rp.isTeam()) {\r
userlist.add(rp.registrant);\r
\r
import com.gitblit.Constants;\r
import com.gitblit.Constants.AccessPermission;\r
+import com.gitblit.Constants.AuthorizationControl;\r
import com.gitblit.Keys;\r
import com.gitblit.git.PatchsetCommand;\r
import com.gitblit.git.PatchsetReceivePack;\r
* RESPONSIBLE LIST\r
*/\r
Set<String> userlist = new TreeSet<String>(ticket.getParticipants());\r
- for (RegistrantAccessPermission rp : app().repositories().getUserAccessPermissions(getRepositoryModel())) {\r
- if (rp.permission.atLeast(AccessPermission.PUSH) && !rp.isTeam()) {\r
- userlist.add(rp.registrant);\r
+ if (UserModel.ANONYMOUS.canPush(getRepositoryModel())\r
+ || AuthorizationControl.AUTHENTICATED == getRepositoryModel().authorizationControl) {\r
+ // authorization is ANONYMOUS or AUTHENTICATED (i.e. all users can be set responsible)\r
+ userlist.addAll(app().users().getAllUsernames());\r
+ } else {\r
+ // authorization is by NAMED users (users with PUSH permission can be set responsible)\r
+ for (RegistrantAccessPermission rp : app().repositories().getUserAccessPermissions(getRepositoryModel())) {\r
+ if (rp.permission.atLeast(AccessPermission.PUSH) && !rp.isTeam()) {\r
+ userlist.add(rp.registrant);\r
+ }\r
}\r
}\r
List<TicketResponsible> responsibles = new ArrayList<TicketResponsible>();\r