Skip to content

Commit

Permalink
Merge pull request edp963#1758 from xxxllluuu/dev-0.3
Browse files Browse the repository at this point in the history
Fix: Create project bug
  • Loading branch information
xxxllluuu authored May 26, 2020
2 parents 46e46bb + 71d6a20 commit 63e37ea
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ private Organization getOrganization(Long id) {

private void checkOwner(Organization organization, Long userId, Long id, String operation) {
RelUserOrganization rel = relUserOrganizationMapper.getRel(userId, id);
if (!organization.getUserId().equals(userId)
if (rel != null && organization.getAllowCreateProject()) {
return;
}

if (!organization.getUserId().equals(userId)
&& (null == rel || rel.getRole() != UserOrgRoleEnum.OWNER.getRole())) {
throw new UnAuthorizedExecption("you have not permission to " + operation + " this project");
}
Expand Down

0 comments on commit 63e37ea

Please sign in to comment.