From 3ab86e9b1dda156f569b3db1d2dee5a564e2be34 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 12 Jun 2025 09:47:01 +0800 Subject: [PATCH] fix: lock conflict while changing view / fix: sign out not blocking refresh tokens --- assets | 2 +- pkg/filemanager/fs/dbfs/props.go | 2 +- service/user/login.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets b/assets index 6dc29be..cdbc286 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 6dc29be623b80495cb5ee9f0bdca2db42b2a3b3e +Subproject commit cdbc2861f9b8d13ec311fd4ee394a3987a604640 diff --git a/pkg/filemanager/fs/dbfs/props.go b/pkg/filemanager/fs/dbfs/props.go index 7b7e409..34c2910 100644 --- a/pkg/filemanager/fs/dbfs/props.go +++ b/pkg/filemanager/fs/dbfs/props.go @@ -28,7 +28,7 @@ func (f *DBFS) PatchProps(ctx context.Context, uri *fs.URI, props *types.FilePro // Lock target lr := &LockByPath{target.Uri(true), target, target.Type(), ""} - ls, err := f.acquireByPath(ctx, -1, f.user, false, fs.LockApp(fs.ApplicationUpdateMetadata), lr) + ls, err := f.acquireByPath(ctx, -1, f.user, true, fs.LockApp(fs.ApplicationUpdateMetadata), lr) defer func() { _ = f.Release(ctx, ls) }() if err != nil { return err diff --git a/service/user/login.go b/service/user/login.go index b0aa086..52d0d22 100644 --- a/service/user/login.go +++ b/service/user/login.go @@ -198,7 +198,7 @@ func (s *RefreshTokenService) Delete(c *gin.Context) (string, error) { // Block root token if claims.RootTokenID != nil { tokenSettings := dep.SettingProvider().TokenAuth(c) - dep.KV().Set(fmt.Sprintf("%s%s", auth.RevokeTokenPrefix, claims.RootTokenID.String()), true, int(tokenSettings.AccessTokenTTL.Seconds()+10)) + dep.KV().Set(fmt.Sprintf("%s%s", auth.RevokeTokenPrefix, claims.RootTokenID.String()), true, int(tokenSettings.RefreshTokenTTL.Seconds()+10)) } return "", nil