-
Notifications
You must be signed in to change notification settings - Fork 7
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
[issue] Some asset can't show "share asset profile" on asset page #2979
Comments
➤ Kenny Hung commented: Currently, this issue seems occur with newer asset. |
➤ Scott Yan commented: need first to check What is the condition displayed " share asset profile " on app |
➤ Kenny Hung commented: It seems related about ✓ [FR] Drop CAI injection in backend ( https://app.asana.com/0/0/1204952756643597 ). This part is deployed on 7/24. When the asset is created after 7/24, that asset can't display "Share Asset Profile" option. |
➤ Sam commented: Kenny Hung, can you provide example asset id? It can be [email protected] ( mailto:[email protected] ) account. |
➤ Kenny Hung commented: Sam Yes, asset nid: bafybeih3nwvwqbflhj6k7tm76gggjo2vdx3lfuzdooglfwvhkvw7p4lxga |
➤ Sam commented: Kenny Hung, currently capture cam will show "share asset profile" if cai_file is not null . I checked and cai_file of bafybeih3nwvwqbflhj6k7tm76gggjo2vdx3lfuzdooglfwvhkvw7p4lxga is null that's why "share asset profile" is not shown.
|
➤ Scott Yan commented: Sam ( cc Kenny Hung ) the cai _ file field was removed to the backend two sprints ago and will not be generated it . Please correct and use other fields to judge |
➤ Kenny Hung commented: Sam Just confirm, does Scott's comment answer your question? Or you need another help? |
➤ Sam commented: Scott Yan, thank you for clarification. My proposal is to rely on asset.id. In capture cam when user captures an image/video asset.id is null in the beginning. Later when asset is registered capture cam set asset.id to id returned by backend. So I think relying on asset.id can be an option. Because
So I will show "Share Asset Profile" if asset.id is not null. |
➤ Sam commented: Kenny Hung, yes Comment by @scott Yan on [issue] Some asset can't show "share asset profile" on asset page ( https://app.asana.com/0/0/1205170085148260/1205330224528317/f ) was helpful. |
➤ Sam commented: Kenny Hung, one more question. I check backend asset ( https://dia-backend-dev.numbersprotocol.io/api/v3/redoc/#operation/assets_read ) which has other interesting fields I could rely on.
My question is "Share Asset Profile" can be executed
|
➤ Kenny Hung commented: Sam (cc Tammy YangScott Yan) I suppose "Yes". Just user own this asset, they could share their asset's asset profile. |
➤ Sam commented: Kenny Hung, thank you for response. Scott Yan (cc: Tammy Yang) how about this?
If condition 1 and 2 are met then allow "Share Asset Profile" |
➤ Sam commented: Kenny Hung, what about when source_type is original or store ? I just need confirm logic table so I can convert it to code. |
➤ Kenny Hung commented: Sam About this part you don't need to judge is_original_owner , the rule should be when user own this asset, user should be able to share the asset profile. No matter asset is from original, post_capture & store. |
➤ Sam commented: Kenny Hung thank you for confirmation. I will implement it now in code. |
➤ Sam commented: James Chien, need your confirmation before it will happen during code review. The goal is to show "Share asset profile" on asset details page. "Share asset profile" menu option should be shown if current user is the owner of asset. My initial thought was if asset.owner == currentUser.email then show "Share asset profile". And I think it should work fine because so far capture cam only allow users to sign up by email. However in the future if capture cam we implements feature Sign up with Web3 address ( https://dia-backend-dev.numbersprotocol.io/api/v3/redoc/#operation/auth_users_signup_web3 ) then asset.owner == currentUser.email will not work for users who signed up with Web3 address. My questions are
In 1st case it is simple and will work until capture cam implements Web3 sign up. In 2nd case it will work when we implement Web3 Sign Up and we will not have to revisit this task again with extra checks like if user has email then check by email if not then check by address. Also want to confirm that to determine asset ownership I can do currentUser.address == asset.owner_addresses.asset_wallet_address instead of currentUser.address == asset.owner_addresses.managed_wallet_address |
➤ James Chien commented: Sam Rely on address is better. Web3 sign up has been implemented in backend for quite some time and there are users without email. owner_addresses.asset_wallet is the old name for the integrity wallet, which is also the user’s address, it’s right to check this field. |
User story
As a user, I want to be able to share the profile of any asset on the asset page, regardless of its type or settings, ensuring consistent sharing functionality for all assets.
Reproduce step
sample: bafybeicapntpoczejnn3447k2nouz4bul3f5atlfla6s5egulmvcwgtzvm
Expectation
When user press share button, it should show "View asset profile", "Copy IPFS address" and "Share Asset Profile"
Additional information:
┆Issue is synchronized with this Asana task by Unito
┆Created By: Kenny Hung
The text was updated successfully, but these errors were encountered: