File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
src/main/java/main/controllers/Project Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
- ## 0.3.2 (unreleased)
3
+ ## 0.3.3 (unreleased)
4
+
5
+ Bugfixes:
6
+ - Local Manager can see Local Permissions page -> [ View Issue] ( https://github.com/aquality-automation/aquality-tracking-ui/issues/22 )
7
+
8
+ ## 0.3.2 (2019-09-10)
4
9
5
10
Features:
6
11
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public ProjectUserController(UserDto user) {
22
22
23
23
@ Override
24
24
public ProjectUserDto create (ProjectUserDto template ) throws AqualityException {
25
- if (baseUser . isAdmin () || baseUser . getProjectUser ( template . getProject_id ()). isAdmin ( )){
25
+ if (isEditorSession ( template )){
26
26
return projectUserDao .create (template );
27
27
}else {
28
28
throw new AqualityPermissionsException ("Account is not allowed to create Project User" , baseUser );
@@ -40,7 +40,7 @@ public List<ProjectUserDto> get(ProjectUserDto template) throws AqualityExceptio
40
40
41
41
@ Override
42
42
public boolean delete (ProjectUserDto template ) throws AqualityException {
43
- if (baseUser . isAdmin () || baseUser . getProjectUser ( template . getProject_id ()). isAdmin ( )){
43
+ if (isEditorSession ( template )){
44
44
return projectUserDao .delete (template );
45
45
}else {
46
46
throw new AqualityPermissionsException ("Account is not allowed to delete Project User" , baseUser );
@@ -59,4 +59,10 @@ private List<ProjectUserDto> fillProjectUsers(List<ProjectUserDto> projectUsers)
59
59
}
60
60
return projectUsers ;
61
61
}
62
+
63
+ private boolean isEditorSession (ProjectUserDto template ){
64
+ return baseUser .isAdmin () || baseUser .isManager ()
65
+ || baseUser .getProjectUser (template .getProject_id ()).isAdmin ()
66
+ || baseUser .getProjectUser (template .getProject_id ()).isManager ();
67
+ }
62
68
}
You can’t perform that action at this time.
0 commit comments