for (SqlWorkspaceUser sqlWorkspaceUser : sqlWorkspaceUsers) {
if (!sqlWorkspaceUser.getWorkspaceAccess().equals(WorkspaceAccess.NONE.toString())) {
String userId = sqlWorkspaceUser.getUser().getUserId();
Workspace workspace = findById(workspaceId, user);
boolean isCreator = ((SqlWorkspace) workspace).getWorkspaceCreator().getUserId().equals(userId);
withAccess.add(new WorkspaceUser(userId, WorkspaceAccess.valueOf(sqlWorkspaceUser.getWorkspaceAccess()), isCreator));
}
}
return withAccess;
}