Commit 9a15d88e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when getting project that doesn't exist NPE was thrown

parent f5096cb8
......@@ -262,6 +262,9 @@ public class ProjectService implements IProjectService {
@Override
public Project getProjectByProjectId(String name, AuthenticationToken token) throws UserAccessException {
Project result = projectDao.getProjectByProjectId(name);
if (result == null) {
return result;
}
if (userService.userHasPrivilege(token, PrivilegeType.VIEW_PROJECT, result)) {
return result;
} else if (userService.userHasPrivilege(token, PrivilegeType.ADD_MAP)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment