src/main/java/kr/wisestone/owl/constant/MngPermission.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/UserWorkspaceService.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/impl/UserWorkspaceServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/java/kr/wisestone/owl/service/impl/WorkspaceServiceImpl.java | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/webapp/WEB-INF/i18n/code_ko_KR.properties | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/webapp/i18n/ko/global.json | ●●●●● 패치 | 보기 | raw | blame | 히스토리 | |
src/main/webapp/views/workspace/workspaceLevelAdd.html | ●●●●● 패치 | 보기 | raw | blame | 히스토리 |
src/main/java/kr/wisestone/owl/constant/MngPermission.java
@@ -5,8 +5,8 @@ */ public class MngPermission { public static final int USER_PERMISSION_MNG_ISSUE_ALL = 32768; public static final int USER_PERMISSION_MNG_PROJECT_ALL = 16384; public static final int USER_PERMISSION_MNG_ISSUE_ALL = 32768; // 전체 이슈 관리 public static final int USER_PERMISSION_MNG_PROJECT_ALL = 16384; // 전체 프로젝트 관리 public static final int USER_PERMISSION_MNG_PARTNER = 8192; // 업체/ISP/호스팅 관리 10000000000000 public static final int USER_PERMISSION_MNG_WORKSPACE = 4096; // WORK SPACE 관리 01000000000000 public static final int USER_PERMISSION_MNG_PROJECT = 2048; // 프로젝트 관리 00100000000000 @@ -57,6 +57,7 @@ public static int makeSubAllPermission() { return (/*USER_PERMISSION_MNG_WORKSPACE |*/ USER_PERMISSION_MNG_ISSUE_ALL | USER_PERMISSION_MNG_PROJECT_ALL | USER_PERMISSION_MNG_API | USER_PERMISSION_MNG_NOTICE | USER_PERMISSION_MNG_FAQ | USER_PERMISSION_MNG_QNA | USER_PERMISSION_MNG_EVENT | USER_PERMISSION_MNG_GUIDE | src/main/java/kr/wisestone/owl/service/UserWorkspaceService.java
@@ -31,6 +31,8 @@ UserWorkspace findMyWorkspace(Long userId); UserWorkspace findWorkspaceManager(Long userId); void disabledUserWorkspace(User user, Workspace workspace); UserWorkspace getUserWorkspace(Long id); src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -151,6 +151,9 @@ private UserWorkspaceService userWorkspaceService; @Autowired private UserLevelService userLevelService; @Autowired private WorkflowDepartmentService workflowDepartmentService; @Autowired @@ -745,8 +748,10 @@ List<Map<String, Object>> results = Lists.newArrayList(); Long totalCount = 0L; UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (this.userWorkspaceService.checkWorkspaceManager(user) || user.getPermission() >= MngPermission.USER_PERMISSION_MNG_ISSUE_ALL) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_ALL)) { results = this.issueMapper.find(issueCondition); totalCount = this.issueMapper.count(issueCondition); } else{ src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java
@@ -66,6 +66,9 @@ private UserWorkspaceService userWorkspaceService; @Autowired private UserLevelService userLevelService; @Autowired private SystemEmailService systemEmailService; @Autowired @@ -363,7 +366,9 @@ if (condition.getWorkspaceManager()) { // 업무공간 관리자일 경우 모든 프로젝트가 표시되어야 한다. // 관리자일 때 if (this.userWorkspaceService.checkWorkspaceManager(user) || user.getPermission() >= MngPermission.USER_PERMISSION_MNG_PROJECT_ALL) { UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_PROJECT_ALL)) { results = this.projectMapper.findByWorkspaceManager(condition); totalCount = this.projectMapper.countByWorkspaceManager(condition); } src/main/java/kr/wisestone/owl/service/impl/UserWorkspaceServiceImpl.java
@@ -79,7 +79,7 @@ public List<UserWorkspaceVo> findUserWorkspace(Map<String, Object> resJsonData, UserWorkspaceCondition condition, Pageable pageable) { UserWorkspace userWorkspace = this.findMyWorkspace(this.webAppUtil.getLoginId()); UserWorkspace userWorkspace = this.findWorkspaceManager(this.webAppUtil.getLoginId()); Workspace myWorkspace = userWorkspace.getWorkspace(); condition.setPage(pageable.getPageNumber() * pageable.getPageSize()); condition.setPageSize(pageable.getPageSize()); @@ -213,7 +213,13 @@ @Override @Transactional(readOnly = true) public UserWorkspace findMyWorkspace(Long userId) { //return this.userWorkspaceRepository.findByUserIdAndManagerYn(userId, true); return this.userWorkspaceRepository.findByUserIdAndManagerYn(userId, true); } // 워크스페이스 관리자 조회 @Override @Transactional(readOnly = true) public UserWorkspace findWorkspaceManager(Long userId) { return this.userWorkspaceRepository.findByUserId(userId); } src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java
@@ -4,6 +4,7 @@ import kr.wisestone.owl.common.ExcelConditionCheck; import kr.wisestone.owl.common.MessageAccessor; import kr.wisestone.owl.constant.Constants; import kr.wisestone.owl.constant.MngPermission; import kr.wisestone.owl.constant.MsgConstants; import kr.wisestone.owl.domain.*; import kr.wisestone.owl.domain.enumType.ProjectType; @@ -60,6 +61,9 @@ @Autowired private UserService userService; @Autowired private UserLevelService userLevelService; @Autowired private UserDepartmentService userDepartmentService; @@ -246,10 +250,12 @@ widgetCondition.setLoginUserId(this.webAppUtil.getLoginId()); widgetCondition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_ALL)) { remainIssue = this.widgetMapper.countRemainIssue(widgetCondition); // 잔여 이슈 delayIssue = this.widgetMapper.countTodayDelayIssue(widgetCondition); // 지연된 이슈 assigneeIssue = this.widgetMapper.countAssigneeIssue(widgetCondition); // 할당된 이슈 @@ -289,10 +295,12 @@ List<Map<String, Object>> progressingProjectDetails = Lists.newArrayList(); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_PROJECT_ALL)) { progressingProjectDetails = this.widgetMapper.findProjectProgressAll(widgetCondition); } else { progressingProjectDetails = this.widgetMapper.findProjectProgress(widgetCondition); @@ -496,11 +504,13 @@ widgetCondition.setLoginUserId(this.webAppUtil.getLoginId()); widgetCondition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectId() != null) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); List<Map<String, Object>> projectMemberIssues = Lists.newArrayList(); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_PROJECT_ALL)) { projectMemberIssues = this.widgetMapper.findProjectMemberIssue(widgetCondition); } else { projectMemberIssues = this.widgetMapper.findProjectMemberIssueByDepartment(widgetCondition); @@ -783,10 +793,12 @@ List<Map<String, Object>> results = Lists.newArrayList(); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_ALL)) { results = this.widgetMapper.findByStandIssueStatus(widgetCondition); }else { results = this.widgetMapper.findByStandIssueStatusOfDepartment(widgetCondition); @@ -815,10 +827,12 @@ // 위젯 검색 조건을 얻어야 할 상황일 때 - 화면에서 탭을 눌러 데이터를 재요청했을 때 위젯 검색 조건을 만들고 전체 프로젝트 정보를 리턴한다. Map<String, Object> results = this.makeWidgetConditionAllProject(widgetCondition, getWidgetCondition); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectId() != null) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); List<Map<String, Object>> issueTypeIssues = Lists.newArrayList(); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_ALL)) { issueTypeIssues = this.widgetMapper.findByStandIssueType(widgetCondition); } else { issueTypeIssues = this.widgetMapper.findByStandIssueTypeOfDepartment(widgetCondition); @@ -898,10 +912,12 @@ widgetCondition.setLoginUserId(this.webAppUtil.getLoginId()); widgetCondition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); User user = this.webAppUtil.getLoginUserObject(); UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); if (this.userWorkspaceService.checkWorkspaceManager(user)) { if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_ALL)) { severityCounts = this.widgetMapper.countSeverityIssue(widgetCondition); severityIssues = this.widgetMapper.findSeverityIssues(widgetCondition); totalCount = this.widgetMapper.countSearchIssue(widgetCondition); src/main/java/kr/wisestone/owl/service/impl/WorkspaceServiceImpl.java
@@ -300,8 +300,13 @@ @Override @Transactional(readOnly = true) public void findMyWorkspace(Map<String, Object> resJsonData) { UserWorkspace userWorkspace = this.userWorkspaceService.findMyWorkspace(this.webAppUtil.getLoginId()); UserWorkspace userWorkspace = this.userWorkspaceService.findWorkspaceManager(this.webAppUtil.getLoginId()); //워크스페이스 관리자 if(userWorkspace == null){ userWorkspace = this.userWorkspaceService.findMyWorkspace(this.webAppUtil.getLoginId()); } Workspace workspace = userWorkspace.getWorkspace(); WorkspaceVo workspaceVo = ConvertUtil.copyProperties(workspace, WorkspaceVo.class); workspaceVo.setServiceType((workspace.getServiceType().toString())); workspaceVo.setExpireDateTerm(DateUtil.getDateDiff(new Date(), workspace.getExpireDate())); // 추가 결제를 진행할 때 금액 계산을 위해 사용 src/main/webapp/WEB-INF/i18n/code_ko_KR.properties
@@ -110,8 +110,8 @@ common.remainIssue=\uC794\uC5EC \uC774\uC288 common.severityIssue=\uC911\uC694\uB3C4 \uBCC4 \uC774\uC288 \uD604\uD669 managementWorkspace.levelName=\uB4F1\uAE09\uBA85 manageUser.manageAllIssuePerm=\uC804\uCCB4 \uC774\uC288 \uAD00\uB9AC manageUser.manageAllProjectPerm=\uC804\uCCB4 \uD504\uB85C\uC81D\uD2B8 \uAD00\uB9AC manageUser.manageAllIssuePerm=\uC804\uCCB4 \uC774\uC288 \uBCF4\uAE30 manageUser.manageAllProjectPerm=\uC804\uCCB4 \uD504\uB85C\uC81D\uD2B8 \uBCF4\uAE30 manageUser.managePartnerPerm=\uC5C5\uCCB4/ISP/\uD638\uC2A4\uD305 \uAD00\uB9AC manageUser.manageWorkspacePerm=\uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4 \uAD00\uB9AC manageUser.manageProjectPerm=\uD504\uB85C\uC81D\uD2B8 \uAD00\uB9AC src/main/webapp/i18n/ko/global.json
@@ -558,8 +558,8 @@ }, "manageUser": { "manageUser": "사용자 권한 관리", "manageAllIssuePerm": "전체 이슈 관리", "manageAllProjectPerm": "전체 프로젝트 관리", "manageAllIssuePerm": "전체 이슈 보기", "manageAllProjectPerm": "전체 프로젝트 보기", "managePartnerPerm" : "업체/ISP/호스팅 관리", "manageWorkspacePerm": "워크스페이스 관리", "manageProjectPerm": "프로젝트 관리", src/main/webapp/views/workspace/workspaceLevelAdd.html
@@ -35,7 +35,7 @@ <!--tableColumnGenerator.dirextive.js 파일 참고--> <tr> <td class="text-left bold"> <span translate="manageUser.manageAllIssuePerm">전체 이슈 관리</span> <span translate="manageUser.manageAllIssuePerm">전체 이슈 보기</span> </td> <td colspan="2"> <label class='switch'><input type='checkbox' ng-model='vm.form.permAllIssueSetting'><span class='slider round'></span></label> @@ -43,7 +43,7 @@ </tr> <tr> <td class="text-left bold"> <span translate="manageUser.manageAllProjectPerm">전체 프로젝트 관리</span> <span translate="manageUser.manageAllProjectPerm">전체 프로젝트 보기</span> </td> <td colspan="2"> <label class='switch'><input type='checkbox' ng-model='vm.form.permAllProjectSetting'><span class='slider round'></span></label>