From 2c81ae0c0de4416a8672abedf061572b56661055 Mon Sep 17 00:00:00 2001 From: oneRain Date: Thu, 29 Apr 2021 15:56:11 +0800 Subject: [PATCH] fix: role acl. --- Storage/Storage/Public/LCACL.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 16646f9..37fdd77 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -173,7 +173,7 @@ namespace LeanCloud.Storage { if (role == null) { throw new ArgumentNullException(nameof(role)); } - string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; + string roleKey = $"{RoleKeyPrefix}{role.Name}"; return GetAccess(ReadAccess, roleKey); } @@ -186,7 +186,7 @@ namespace LeanCloud.Storage { if (role == null) { throw new ArgumentNullException(nameof(role)); } - string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; + string roleKey = $"{RoleKeyPrefix}{role.Name}"; SetAccess(ReadAccess, roleKey, value); } @@ -199,7 +199,7 @@ namespace LeanCloud.Storage { if (role == null) { throw new ArgumentNullException(nameof(role)); } - string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; + string roleKey = $"{RoleKeyPrefix}{role.Name}"; return GetAccess(WriteAccess, roleKey); } @@ -212,7 +212,7 @@ namespace LeanCloud.Storage { if (role == null) { throw new ArgumentNullException(nameof(role)); } - string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; + string roleKey = $"{RoleKeyPrefix}{role.Name}"; SetAccess(WriteAccess, roleKey, value); }