package kr.wisestone.owl.constant; /** * Created by zenith at 20200803 */ public class MngPermission { 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 = 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 public static final int USER_PERMISSION_MNG_CUSTOME_FIELD = 128; // 사용자정의 필드 관리 00000010000000 public static final int USER_PERMISSION_MNG_ISSUE_TYPE = 64; // ISSUE TYPE 관리 00000000100000 public static final int USER_PERMISSION_MNG_NOTICE = 32; // ISSUE TYPE 관리 00000000010000 public static final int USER_PERMISSION_MNG_FAQ = 16; // FAQ 관리 00000000001000 public static final int USER_PERMISSION_MNG_QNA = 8; // 공지사항 관리 00000000000100 public static final int USER_PERMISSION_MNG_EVENT = 4; // 공지사항 관리 00000000000010 public static final int USER_PERMISSION_MNG_GUIDE = 2; // 사용자 알림 관리 00000000000001 public static final int USER_PERMISSION_MNG_NONE = 0; // public static final int USER_PERMISSION_MNG_ISSUE_SETTING = (USER_PERMISSION_MNG_ISSUE_STATUS | USER_PERMISSION_MNG_WORKFLOW | USER_PERMISSION_MNG_CUSTOME_FIELD | USER_PERMISSION_MNG_ISSUE_TYPE); public static boolean checkMngPermission(int userPermission, int typePermission) { return ((userPermission & typePermission) != 0); } public static int makePermission(boolean userPermission, int typePermission) { if(userPermission) return typePermission; else return USER_PERMISSION_MNG_NONE; } public static int makeAllPermission() { return ( USER_PERMISSION_MNG_PROJECT | USER_PERMISSION_MNG_ISSUE | USER_PERMISSION_MNG_WORKSPACE | USER_PERMISSION_MNG_PARTNER | USER_PERMISSION_MNG_API | USER_PERMISSION_MNG_NOTICE | USER_PERMISSION_MNG_FAQ | USER_PERMISSION_MNG_QNA | USER_PERMISSION_MNG_GUIDE | USER_PERMISSION_MNG_ISSUE_SETTING); } public static int makeSubAllPermission() { return (/*USER_PERMISSION_MNG_WORKSPACE |*/ USER_PERMISSION_MNG_ISSUE | USER_PERMISSION_MNG_API | USER_PERMISSION_MNG_NOTICE | USER_PERMISSION_MNG_FAQ | USER_PERMISSION_MNG_QNA | USER_PERMISSION_MNG_EVENT | USER_PERMISSION_MNG_GUIDE | USER_PERMISSION_MNG_ISSUE_SETTING); } // 이슈 시스템 권한 (상태, 워크플로우, 사용자 정의 필드, 이슈유형 포함) public static int makeIssuePermission() { return (USER_PERMISSION_MNG_ISSUE_STATUS | USER_PERMISSION_MNG_WORKFLOW | USER_PERMISSION_MNG_CUSTOME_FIELD | USER_PERMISSION_MNG_ISSUE_TYPE); } }