| | |
| | | */ |
| | | public class MngPermission { |
| | | |
| | | public static final int USER_PERMISSION_MNG_ISSUE_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 |
| | | public static final int USER_PERMISSION_MNG_WORKSPACE = 16384; // WORK SPACE 관리 01000000000000 |
| | | public static final int USER_PERMISSION_MNG_PROJECT = 8192; // 프로젝트 관리 00100000000000 |
| | | public static final int USER_PERMISSION_MNG_ISSUE_PROJECT_ALL = 4096; // 전체 이슈 프로젝트 보기 |
| | | public static final int USER_PERMISSION_MNG_PARTNER = 2048; // 업체/ISP/호스팅 관리 10000000000000 |
| | | public static final int USER_PERMISSION_MNG_API = 1024; // API 관리 00010000000000 |
| | | public static final int USER_PERMISSION_MNG_ISSUE_STATUS = 512; // ISSUE SETTING 관리 00001000000000 |
| | | public static final int USER_PERMISSION_MNG_WORKFLOW = 256; // WORK FLOW 관리 000000100000000 |
| | |
| | | condition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); |
| | | projectCondition.setWorkspaceId(condition.getWorkspaceId()); |
| | | |
| | | |
| | | // 프로젝트 키가 존재할 경우 프로젝트 키에 해당하는 프로젝트를 조회하고 검색 조건에 셋팅한다. |
| | | if (!this.getProjectByProjectKey(condition.getProjectKey(), condition)) { |
| | | return false; |
| | |
| | | // 프로젝트를 선택하지 않았으면 해당 업무 공간에서 참여하고 있는 프로젝트를 찾는다. |
| | | if (condition.getProjectIds().size() < 1) { |
| | | List<Map<String, Object>> projects = null; |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user)) { |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user) |
| | | || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_PROJECT_ALL)) { |
| | | projects = this.projectMapper.findByWorkspaceManagerAll(projectCondition); |
| | | } else { |
| | | projects = this.projectService.findByWorkspaceIdAndIncludeProjectAll(projectCondition); |
| | |
| | | @Transactional(readOnly = true) |
| | | public List<ProjectVo> findByIncludeProject(List<String> statuses, String projectType) { |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); |
| | | |
| | | ProjectCondition projectCondition = new ProjectCondition(); |
| | | projectCondition.setLoginUserId(user.getId()); |
| | |
| | | |
| | | List<Map<String, Object>> results; |
| | | |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user)) { |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user) |
| | | || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_PROJECT_ALL)) { |
| | | results = this.projectMapper.findByWorkspaceManager(projectCondition); |
| | | } else { |
| | | results = this.projectMapper.findByWorkspaceIdAndIncludeProject(projectCondition); |
| | |
| | | @Transactional(readOnly = true) |
| | | public WidgetCondition makeWidgetCondition() { |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); |
| | | // 해당 워크스페이스에서 참여하고 있는 프로젝트 중 상태가 오픈인 프로젝트 |
| | | List<Map<String, Object>> projects = null; |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user)) { |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user) |
| | | || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_PROJECT_ALL)) { |
| | | projects = this.projectService.findByWorkspaceManagerAll(); |
| | | } else { |
| | | projects = this.projectService.findByWorkspaceIdAndIncludeProjectAll(Lists.newArrayList("02"), ProjectType.BTS_PROJECT.toString()); |
| | |
| | | break; |
| | | |
| | | case "All_ISSUE_PROJECT_SETTING_PERM_YN" : |
| | | makeTag += "<label class='switch'><input type='checkbox' ng-model='data.permAllIssueSetting' ng-click='event.modifyLevelPermission(data)'><span class='slider round'></span></label>"; |
| | | makeTag += "<label class='switch'><input type='checkbox' ng-model='data.permAllIssueAndProjectSetting' ng-click='event.modifyLevelPermission(data)'><span class='slider round'></span></label>"; |
| | | break; |
| | | |
| | | case "PARTNER_SETTING_PERM_YN" : |
| | |
| | | }); |
| | | |
| | | $scope.$on("changedLastProject", function () { |
| | | if ($rootScope.workProject != null) { |
| | | //if ($rootScope.workProject != null) { |
| | | $scope.fn.findIssueList($rootScope.workProject.id); |
| | | } |
| | | //} |
| | | }); |
| | | |
| | | function setLastIssueType() { |
| | |
| | | } |
| | | |
| | | function changeLastProject(projectId) { |
| | | //$rootScope.changeLastProject(projectId); |
| | | $state.go("issues.list") |
| | | $rootScope.changeLastProject(projectId); |
| | | } |
| | | |
| | | $scope.fn.makeTableConfigs(); |
| | |
| | | id : parameter.id, |
| | | form : { |
| | | levelName : "", |
| | | permAllIssueSetting : false, |
| | | permAllProjectSetting : false, |
| | | permAllIssueAndProjectSetting : false, |
| | | permWorkSpaceSetting : false, |
| | | permProjectSetting : false, |
| | | permIssueSetting : false, |
| | |
| | | |
| | | // 권한 리스트 |
| | | $rootScope.mngPermission = { |
| | | "USER_PERMISSION_MNG_ISSUE_ALL" : 32768, |
| | | "USER_PERMISSION_MNG_PROJECT_ALL" : 16384, |
| | | "USER_PERMISSION_MNG_PARTNER" : 8192, |
| | | "USER_PERMISSION_MNG_WORKSPACE" : 4096, |
| | | "USER_PERMISSION_MNG_PROJECT" : 2048, |
| | | "USER_PERMISSION_MNG_WORKSPACE" : 16384, |
| | | "USER_PERMISSION_MNG_PROJECT" : 8192, |
| | | "USER_PERMISSION_MNG_ISSUE_PROJECT_ALL" : 4096, |
| | | "USER_PERMISSION_MNG_PARTNER" : 2048, |
| | | "USER_PERMISSION_MNG_API" : 1024, |
| | | "USER_PERMISSION_MNG_ISSUE_STATUS" : 512, |
| | | "USER_PERMISSION_MNG_WORKFLOW" : 256, |
| | |
| | | |
| | | return false; |
| | | }; |
| | | |
| | | /*$rootScope.checkMngPermissionViewIssueAndProject = function (userPermission) { |
| | | if (!$rootScope.isDefined($rootScope.user)) { |
| | | return false; |
| | | } |
| | | |
| | | var permissionVal = $rootScope.mngPermission[userPermission]; |
| | | |
| | | if (($rootScope.user.permission & permissionVal) !== 0) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | };*/ |
| | | |
| | | // setting 관리자인지 확인한다. |
| | | $rootScope.checkMngPermissionSettings = function () { |
| | |
| | | $rootScope.workProject = el; |
| | | if (onEvent) { |
| | | $rootScope.$broadcast("changedLastProject", {id: el.id}); |
| | | $state.go("issues.list"); |
| | | } |
| | | |
| | | if (reload) { |
| | | /*if (reload) { |
| | | $state.go('dashboards.dashboard'); |
| | | } |
| | | }*/ |
| | | } |
| | | }); |
| | | // $state.go($state.current, {}, {reload: reload}); |
| | | //$state.go($state.current, {}, {reload: reload}); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | // 프로젝트 관리 권한이 있는지 확인한다 |
| | | $rootScope.checkMngPermissionProject = function () { |
| | |
| | | </div> |
| | | <div class="top-right col-lg-4"> |
| | | <!-- 전체 프로젝트 일때 이슈 만들기 버튼 숨김 --> |
| | | <button class="btn btn-xlg btn-primary btn-rounded mr-10" ng-if="$root.workProject.id > -1" ng-click="fn.addIssue()" tabindex="-1"> |
| | | <button class="btn btn-xlg btn-primary btn-rounded mr-10" ng-if="$root.checkMngPermissionSettings() && $root.workProject.id > -1" ng-click="fn.addIssue()" tabindex="-1"> |
| | | <i class="os-icon os-icon-plus"></i> <span translate="issue.createIssue">이슈 만들기</span> |
| | | </button> |
| | | |
| | |
| | | <span translate="manageUser.manageAllIssueAndProjectPerm">전체 이슈 프로젝트 보기</span> |
| | | </td> |
| | | <td colspan="2"> |
| | | <label class='switch'><input type='checkbox' ng-model='vm.form.permAllIssueSetting'><span class='slider round'></span></label> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="text-left bold"> |
| | | <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> |
| | | <label class='switch'><input type='checkbox' ng-model='vm.form.permAllIssueAndProjectSetting'><span class='slider round'></span></label> |
| | | </td> |
| | | </tr> |
| | | <tr> |