return insertIssueFilter(issueFilter, user);
}
public DefaultIssueFilter update(DefaultIssueFilter issueFilter, UserSession userSession) {
String user = getNotNullLogin(userSession);
IssueFilterDto issueFilterDto = findIssueFilterDto(issueFilter.id(), user);
<BUG>verifyCurrentUserCanModifyFilter(issueFilterDto.toIssueFilter(), user, userSession);
if (!issueFilterDto.getUserLogin().equals(issueFilter.user()) && !userSession.hasPermission(Permissions.SYSTEM_ADMIN)) {
throw new ForbiddenException("User is not authorized to change the owner of this filter");
}</BUG>
validateFilter(issueFilter, user);

return insertIssueFilter(issueFilter, user);
}
public DefaultIssueFilter update(DefaultIssueFilter issueFilter, UserSession userSession) {
String user = getNotNullLogin(userSession);
IssueFilterDto issueFilterDto = findIssueFilterDto(issueFilter.id(), user);
verifyCurrentUserCanModifyFilter(issueFilterDto.toIssueFilter(), user);
if(!issueFilterDto.getUserLogin().equals(issueFilter.user())) {
verifyCurrentUserCanChangeFilterOwnership(user);
}
validateFilter(issueFilter, user);
