支持通知凭据验证后查看并收紧账号权限

This commit is contained in:
xuans committed 2026-09-26 22:16:47 +08:00
1 parent 85feb38c5d
commit a1dc20af85
9 files changed
+240 -29

No files matched your search

+4
View File
@@ -63,6 +63,10 @@ func Authorize(request Request) error {
func authorizeResource(request Request) error {
switch request.Capability {
case CapabilityNotificationReveal:
if !request.OwnResource && !CanManageNotification(request.ActorRole, request.TargetRole, false) {
return deny(CodeAccessDenied)
}
case CapabilityNotificationManage:
if !CanManageNotification(request.ActorRole, request.TargetRole, request.OwnResource) {
return deny(CodeTargetRoleDenied)