-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dynamic acl related support #18
Comments
Why cyfs-ts-sdk cyfs.GlobalStatePathAccessItem constructor function can`t set parameter? And cyfs.AccessString not contain Handler type. Currently constructing GlobalStatePathGroupAccess::Handler access is very unfriendly
let item = GlobalStatePathAccessItem {
path: TEST_REQ_PATH.to_owned(),
access: GlobalStatePathGroupAccess::Handler,
};
let item1 : cyfs.GlobalStatePathAccessItem = cyfs.GlobalStatePathAccessItem.new("QATest",cyfs.AccessString.full());
item1.access = cyfs.GlobalStatePathGroupAccess.Handler();
let item2 : cyfs.GlobalStatePathAccessItem = new cyfs.GlobalStatePathAccessItem();
item2.access = cyfs.GlobalStatePathGroupAccess.Handler();
item2.path = "QATest"; |
@weiqiushi You set cyfs.GlobalStatePathAccessItem constructor private ,If use cyfs-ts-sdk source code ,I can use private constructor ,But if compile code as cyfs_node it will missing private function cyfs-ts-sdk/src/sdk/cyfs-lib/rmeta/def.ts Line 113 in 0c7d1d5
|
Yes. Unlike the rust language, there is no struct in typescript, only use class to approximate the GlobalStatePathAccessItem struct. And because class must have a constructor, in order to simulate the behavior of new() and new_group() in rust, a private constructor is used, and the public static functions new() and new_group() are used to construct the GlobalStatePathAccessItem. In fact, in the rust code, if you construct the GlobalStatePathAccessItem using only new() and new_group(), the written code will be the same as the ts version |
When emit acl handler,It will maybe throw error "convert base58 str failed, str=undefined, Expected String" Details
[debug],[2023-04-27 17:20:24.658],<>,will emit handler: full_id=acl_acl_smoke-test-dynamic-token, param={"request":{"dec_id":"9tGpLNndR5tyui8DkYBpEz8mFHzjfqkCVmsFusa5roHd","permissions":"r--","req_path":"/QATest","req_query_string":"token=QATest-token","source":{"dec":"9tGpLNndR5tyui8DkYBpEz8mFHzjfqkCVmsFusa5roHd","protocol":"http-bdt","zone":{"device":"5aSixgMHNaHEBwwhu8VhSCSgynDSzzhSmEbh59DgZRsN","zone":"5r4MYfFQWVzRG9i88MgDEbmRtsdugbsCU81LmFE5cWGF","zone_category":"other-zone"}}}}, cyfs_node.js:85892 |
This feature has test finished. |
We need to add support for the ts-sdk side of this feature buckyos/CYFS#175, mainly including changes related to the cyfs-lib side, involving the following.
The text was updated successfully, but these errors were encountered: