Browse Source

注释掉权限设置

master
牧羊人 4 years ago
parent
commit
2f1b4d9ba3
2 changed files with 13 additions and 13 deletions
  1. +7
    -7
      src/main/java/com/taauav/front/controller/UserAdminController.java
  2. +6
    -6
      src/main/java/com/taauav/front/controller/UserAuthRuleController.java

+ 7
- 7
src/main/java/com/taauav/front/controller/UserAdminController.java View File

* @return * @return
*/ */
@PostMapping("/index") @PostMapping("/index")
@RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION)
public Response index(@RequestBody(required = false) UserAdminQuery query) { public Response index(@RequestBody(required = false) UserAdminQuery query) {
return userAdminService.getList(query); return userAdminService.getList(query);
} }
* @return * @return
*/ */
@PostMapping("/add") @PostMapping("/add")
@RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION)
public Response add(@RequestBody(required = true) @Valid UserAdmin entity, BindingResult bindingResult) { public Response add(@RequestBody(required = true) @Valid UserAdmin entity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
String message = bindingResult.getFieldError().getDefaultMessage(); String message = bindingResult.getFieldError().getDefaultMessage();
* @return * @return
*/ */
@GetMapping("/info") @GetMapping("/info")
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
public Response info(Integer id) { public Response info(Integer id) {
return userAdminService.info(id); return userAdminService.info(id);
} }
* @return * @return
*/ */
@PostMapping("/edit") @PostMapping("/edit")
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
public Response edit(@RequestBody @Valid UserAdmin entity, BindingResult bindingResult) { public Response edit(@RequestBody @Valid UserAdmin entity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
String message = bindingResult.getFieldError().getDefaultMessage(); String message = bindingResult.getFieldError().getDefaultMessage();
* @return * @return
*/ */
@PostMapping("/drop") @PostMapping("/drop")
@RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION)
public Response drop(Integer id) { public Response drop(Integer id) {
return userAdminService.drop(id); return userAdminService.drop(id);
} }
* @return * @return
*/ */
@PostMapping("/setStatus") @PostMapping("/setStatus")
@RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION)
public Response setStatus(@RequestBody UserAdmin entity) { public Response setStatus(@RequestBody UserAdmin entity) {
return userAdminService.setStatus(entity); return userAdminService.setStatus(entity);
} }
* @return * @return
*/ */
@PostMapping("/resetPwd") @PostMapping("/resetPwd")
@RequiresPermissions(controllerName + ":" + PermissionConstants.PASSWORD_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.PASSWORD_PERMISSION)
public Response resetPwd(@RequestBody UserAdmin entity) { public Response resetPwd(@RequestBody UserAdmin entity) {
return userAdminService.resetPwd(entity); return userAdminService.resetPwd(entity);
} }

+ 6
- 6
src/main/java/com/taauav/front/controller/UserAuthRuleController.java View File

* @return * @return
*/ */
@GetMapping("/index") @GetMapping("/index")
@RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION)
public Response index(@RequestBody(required = false) Map<String, String> request) { public Response index(@RequestBody(required = false) Map<String, String> request) {
return iSysAuthRuleService.getRulePageList(request); return iSysAuthRuleService.getRulePageList(request);
} }
* @return * @return
*/ */
@RequestMapping("/edit") @RequestMapping("/edit")
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
public Response edit(@RequestBody @Valid SysAuthRule authRule, BindingResult bindingResult) { public Response edit(@RequestBody @Valid SysAuthRule authRule, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
String msg = bindingResult.getFieldError().getDefaultMessage(); String msg = bindingResult.getFieldError().getDefaultMessage();
* @return * @return
*/ */
@GetMapping("/getAuthInfo") @GetMapping("/getAuthInfo")
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION)
public Response getAuthInfo(Integer id) { public Response getAuthInfo(Integer id) {
Map<String, Object> map = new HashMap<>(12); Map<String, Object> map = new HashMap<>(12);
SysAuthRule info = iSysAuthRuleService.getInfoById(id); SysAuthRule info = iSysAuthRuleService.getInfoById(id);
* @return * @return
*/ */
@PostMapping("/add") @PostMapping("/add")
@RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION)
public Response add(@RequestBody @Valid SysAuthRule authRule, BindingResult bindingResult) { public Response add(@RequestBody @Valid SysAuthRule authRule, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
String msg = bindingResult.getFieldError().getDefaultMessage(); String msg = bindingResult.getFieldError().getDefaultMessage();
* @return * @return
*/ */
@PostMapping("/del") @PostMapping("/del")
@RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION)
public Response del(@RequestBody SysAuthRule authRule) { public Response del(@RequestBody SysAuthRule authRule) {
return iSysAuthRuleService.delRule(authRule); return iSysAuthRuleService.delRule(authRule);
} }
* @return * @return
*/ */
@PostMapping("/editStatus") @PostMapping("/editStatus")
@RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION)
// @RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION)
public Response editStatus(@RequestBody Map<String, String> map) { public Response editStatus(@RequestBody Map<String, String> map) {
return iSysAuthRuleService.editStatus(map); return iSysAuthRuleService.editStatus(map);
} }

Loading…
Cancel
Save