|
@@ -73,8 +73,6 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
.asList(new String[]{"index_privilege_group_list", "index_app_list", "index_school",
|
|
.asList(new String[]{"index_privilege_group_list", "index_app_list", "index_school",
|
|
"school_config", "index_school_privilege_settings", "system"});
|
|
"school_config", "index_school_privilege_settings", "system"});
|
|
|
|
|
|
- private static final String STUDENT_CLIENT_MENU = "STUDENT_CLIENT_MENU";
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
PrivilegeGroupRepo privilegeGroupRepo;
|
|
PrivilegeGroupRepo privilegeGroupRepo;
|
|
|
|
|
|
@@ -275,10 +273,11 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
|
|
|
|
if (null == group) {
|
|
if (null == group) {
|
|
- PrivilegeGroupEntity globalGroup = privilegeGroupRepo.findByCode(STUDENT_CLIENT_MENU);
|
|
|
|
|
|
+ PrivilegeGroupEntity globalGroup = privilegeGroupRepo
|
|
|
|
+ .findByCode(PrivilegeGroupType.STUDENT_CLIENT_MENU.name());
|
|
|
|
|
|
group = new PrivilegeGroupEntity();
|
|
group = new PrivilegeGroupEntity();
|
|
- group.setCode(STUDENT_CLIENT_MENU + "_" + rootOrgId);
|
|
|
|
|
|
+ group.setCode(PrivilegeGroupType.STUDENT_CLIENT_MENU.name() + "_" + rootOrgId);
|
|
group.setName(globalGroup.getName());
|
|
group.setName(globalGroup.getName());
|
|
group.setRootOrgId(rootOrgId);
|
|
group.setRootOrgId(rootOrgId);
|
|
group.setType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
group.setType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
@@ -369,14 +368,15 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
validateRootOrgIsolation(rootOrgId);
|
|
validateRootOrgIsolation(rootOrgId);
|
|
}
|
|
}
|
|
|
|
|
|
- String code = STUDENT_CLIENT_MENU + "_" + rootOrgId;
|
|
|
|
|
|
+ String code = PrivilegeGroupType.STUDENT_CLIENT_MENU.name() + "_" + rootOrgId;
|
|
|
|
|
|
boolean undefined = false;
|
|
boolean undefined = false;
|
|
|
|
|
|
PrivilegeGroupEntity privilegeGroup = privilegeGroupRepo.findByCode(code);
|
|
PrivilegeGroupEntity privilegeGroup = privilegeGroupRepo.findByCode(code);
|
|
|
|
|
|
if (null == privilegeGroup) {
|
|
if (null == privilegeGroup) {
|
|
- privilegeGroup = privilegeGroupRepo.findByCode(STUDENT_CLIENT_MENU);
|
|
|
|
|
|
+ privilegeGroup = privilegeGroupRepo
|
|
|
|
+ .findByCode(PrivilegeGroupType.STUDENT_CLIENT_MENU.name());
|
|
undefined = true;
|
|
undefined = true;
|
|
} else {
|
|
} else {
|
|
if (null == privilegeGroup.getRootOrgId()) {
|
|
if (null == privilegeGroup.getRootOrgId()) {
|
|
@@ -566,7 +566,7 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
privilege = privilegeRepo.save(privilege);
|
|
privilege = privilegeRepo.save(privilege);
|
|
|
|
|
|
if (group.getType().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU)
|
|
if (group.getType().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU)
|
|
- && group.getCode().equals(STUDENT_CLIENT_MENU)) {
|
|
|
|
|
|
+ && group.getCode().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU.name())) {
|
|
|
|
|
|
List<PrivilegeGroupEntity> gList = privilegeGroupRepo
|
|
List<PrivilegeGroupEntity> gList = privilegeGroupRepo
|
|
.findAllByType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
.findAllByType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
@@ -618,7 +618,7 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
privilege.getGroupId(), PrivilegeGroupEntity.class);
|
|
privilege.getGroupId(), PrivilegeGroupEntity.class);
|
|
|
|
|
|
if (groupEntity.getType().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU)
|
|
if (groupEntity.getType().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU)
|
|
- && groupEntity.getCode().equals(STUDENT_CLIENT_MENU)) {
|
|
|
|
|
|
+ && groupEntity.getCode().equals(PrivilegeGroupType.STUDENT_CLIENT_MENU.name())) {
|
|
|
|
|
|
List<PrivilegeGroupEntity> gList = privilegeGroupRepo
|
|
List<PrivilegeGroupEntity> gList = privilegeGroupRepo
|
|
.findAllByType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|
|
.findAllByType(PrivilegeGroupType.STUDENT_CLIENT_MENU);
|