then I don’t find a corresponding ACL method in Jenkins.
@POST
public ListBoxModel doFillTypeItems(@AncestorInPath final ItemGroup<?> item) {
if (item == null) {
if (Jenkins.get().hasPermission(View.CONFIGURE)) {
return createTypesModel();
}
}
if (Jenkins.get().getAuthorizationStrategy().getACL(item).hasPermission(View.CONFIGURE)) {
return createTypesModel();
}
return new ListBoxModel();
}
But there is no getAcl method for item groups. What is the correct way to authenticate here?
What I also tried is to use a View. This code compiles but I do not get the view as AncestorInPath.
@POST
public ListBoxModel doFillTypeItems(@AncestorInPath final View view) {…}