refactor: 修改权限规范.
This commit is contained in:
@@ -75,7 +75,7 @@ public class DictKeyController {
|
||||
|
||||
@PutMapping("/refresh-cache")
|
||||
@Operation(summary = "刷新字典缓存")
|
||||
@PreAuthorize("@ss.hasPermission('infra:dict-key:refresh-cache')")
|
||||
@PreAuthorize("@ss.hasPermission('infra:dict-key:management:refresh-cache')")
|
||||
public HttpWrapper<?> refreshCache() {
|
||||
dictKeyService.refreshCache();
|
||||
return HttpWrapper.ok();
|
||||
|
||||
@@ -14,4 +14,9 @@ Authorization: {{token}}
|
||||
"endTime": ""
|
||||
}
|
||||
|
||||
### 查询登录日志
|
||||
GET {{baseUrl}}/infra/operator-log/login-history?username=admin
|
||||
Content-Type: application/json
|
||||
Authorization: {{token}}
|
||||
|
||||
###
|
||||
@@ -50,7 +50,7 @@ public class OperatorLogController {
|
||||
@IgnoreLog(IgnoreLogMode.RET)
|
||||
@GetMapping("/login-history")
|
||||
@Operation(summary = "查询用户登录日志")
|
||||
@PreAuthorize("@ss.hasPermission('infra:operator-log:query')")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:login-history')")
|
||||
public List<LoginHistoryVO> getLoginHistory(@RequestParam("username") String username) {
|
||||
return operatorLogService.getLoginHistory(username);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class PermissionController {
|
||||
|
||||
@PutMapping("/refresh-cache")
|
||||
@Operation(summary = "刷新角色权限缓存")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-menu:refresh-cache')")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-menu:management:refresh-cache')")
|
||||
public HttpWrapper<?> refreshCache() {
|
||||
permissionService.initPermissionCache();
|
||||
return HttpWrapper.ok();
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SystemUserController {
|
||||
@OperatorLog(SystemUserOperatorType.RESET_PASSWORD)
|
||||
@PutMapping("/reset-password")
|
||||
@Operation(summary = "重置用户密码")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:reset-password')")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:management:reset-password')")
|
||||
public HttpWrapper<?> resetUserPassword(@Validated @RequestBody UserResetPasswordRequest request) {
|
||||
systemUserService.resetPassword(request);
|
||||
return HttpWrapper.ok();
|
||||
@@ -153,7 +153,7 @@ public class SystemUserController {
|
||||
@OperatorLog(SystemUserOperatorType.OFFLINE)
|
||||
@PutMapping("/session/offline")
|
||||
@Operation(summary = "下线用户会话")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:offline-session')")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:management:offline-session')")
|
||||
public HttpWrapper<?> offlineUserSession(@Validated @RequestBody UserSessionOfflineRequest request) {
|
||||
systemUserManagementService.offlineUserSession(request);
|
||||
return HttpWrapper.ok();
|
||||
|
||||
Reference in New Issue
Block a user