mirror of
https://github.com/larksuite/cli.git
synced 2026-07-08 02:00:19 +08:00
fix(drive): use docs secure label read scope (#1281)
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
secureLabelReadScope = "drive:file.meta.sec_label.read_only"
|
||||
secureLabelReadScope = "docs:secure_label:readonly"
|
||||
secureLabelUpdateScope = "docs:secure_label:write_only"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,6 +12,17 @@ import (
|
||||
"github.com/larksuite/cli/internal/httpmock"
|
||||
)
|
||||
|
||||
func TestDriveSecureLabelScopes(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if len(DriveSecureLabelList.Scopes) != 1 || DriveSecureLabelList.Scopes[0] != "docs:secure_label:readonly" {
|
||||
t.Fatalf("list scopes = %v, want docs:secure_label:readonly", DriveSecureLabelList.Scopes)
|
||||
}
|
||||
if len(DriveSecureLabelUpdate.Scopes) != 1 || DriveSecureLabelUpdate.Scopes[0] != "docs:secure_label:write_only" {
|
||||
t.Fatalf("update scopes = %v, want docs:secure_label:write_only", DriveSecureLabelUpdate.Scopes)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDriveSecureLabelList_DryRun(t *testing.T) {
|
||||
t.Parallel()
|
||||
f, stdout, _, _ := cmdutil.TestFactory(t, driveTestConfig())
|
||||
|
||||
Reference in New Issue
Block a user