Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface ProjectAccountDao extends GenericDao<ProjectAccountVO, Long> {

ProjectAccountVO findByProjectIdAccountId(long projectId, long accountId);

ProjectAccountVO findByProjectIdUserId(long projectId, long accountId, long userId);
ProjectAccountVO findByProjectIdUserId(long projectId, long accountId, Long userId);

boolean canUserAccessProjectAccount(long accountId, long userId, long projectAccountId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ public ProjectAccountVO findByProjectIdAccountId(long projectId, long accountId)
}

@Override
public ProjectAccountVO findByProjectIdUserId(long projectId, long accountId, long userId) {
public ProjectAccountVO findByProjectIdUserId(long projectId, long accountId, Long userId) {
SearchCriteria<ProjectAccountVO> sc = AllFieldsSearch.create();
sc.setParameters("projectId", projectId);
sc.setParameters("userId", userId);
if (userId != null) {
sc.setParameters("userId", userId);
}
sc.setParameters("accountId", accountId);

return findOneBy(sc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public Boolean doInTransaction(TransactionStatus status) {

@Override
public boolean unassignAccountFromProject(long projectId, long accountId) {
ProjectAccountVO projectAccount = _projectAccountDao.findByProjectIdAccountId(projectId, accountId);
ProjectAccountVO projectAccount = _projectAccountDao.findByProjectIdUserId(projectId, accountId, null);
if (projectAccount == null) {
logger.debug("Account id=" + accountId + " is not assigned to project id=" + projectId + " so no need to unassign");
return true;
Expand Down
Loading