Skip to content
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

feat: use new ucanto allows api for canDelegateCapability and implement space registration #539

Conversation

travis
Copy link
Member

@travis travis commented Mar 14, 2023

  • use the new allows function in ucanto to reimplemeent canDelegateCapability
  • move space registration from newCreateSpace to registerSpace where it belongs
    • use agent's current account in registerSpace rather than requiring an email

@gobengo gobengo changed the title Revert "Revert "feat: fix canDelegateCapability et al"" fix: Revert "Revert "feat: fix canDelegateCapability et al"" Mar 15, 2023
gobengo added a commit that referenced this pull request Mar 15, 2023
Motivation:
* do the upgrade so that we can merge
#539 after (which
requires the upgrade)
gobengo and others added 3 commits March 15, 2023 10:05
Motivation:
* do the upgrade so that we can merge
#539 after (which
requires the upgrade)
@travis travis marked this pull request as ready for review March 15, 2023 17:06
@travis travis changed the title fix: Revert "Revert "feat: fix canDelegateCapability et al"" feat: use new ucanto allows api for canDelegateCapability Mar 15, 2023
@travis travis changed the title feat: use new ucanto allows api for canDelegateCapability feat: use new ucanto allows api for canDelegateCapability and implement space registration Mar 15, 2023
* @param {Ucanto.Principal<Ucanto.DID<'key'>>} device
*/
async function createSpaceSaysDeviceCanAccessDelegateWithSpace(space, device) {
async function createSpaceSaysDeviceCanAccessDelegateWithSpace(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may want to call this function now/soon createIssuerSays... since the authorization will now no longer always be from Space.

},
})
}

/**
*
* @param {Signer.EdSigner} space - TODO is this type correct?
* @param {Ucanto.DID} space - TODO is this type correct?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be Ucanto.DID<'key'> but also can change after merge

canDelegateAbility(parent.can, child.can)
) {
return true
// @ts-ignore ignore this until we bring in ucanto as a normal dependency rather than linking to a local version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to remove this right?

@gobengo gobengo merged commit 2156f23 into feat/implement-access-authorize-in-agent Mar 15, 2023
@gobengo gobengo deleted the feat/implement-access-authorize-in-agent-new-ucanto branch March 15, 2023 17:20
gobengo added a commit that referenced this pull request Apr 11, 2023
Motivation:
* do the upgrade so that we can merge
#539 after (which
requires the upgrade)
gobengo added a commit that referenced this pull request Apr 11, 2023
…ment space registration (#539)

* use the new `allows` function in `ucanto` to reimplemeent
`canDelegateCapability`
* move space registration from `newCreateSpace` to `registerSpace` where
it belongs
* use agent's current account in registerSpace rather than requiring an
email

---------

Co-authored-by: Benjamin Goering <[email protected]>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[5.0.0](storacha/w3ui@keyring-core-v4.2.0...keyring-core-v5.0.0)
(2023-07-25)


### ⚠ BREAKING CHANGES

* upgrade access client, ucanto and other packages
([storacha#530](storacha/w3ui#530))

### Features

* upgrade access client, ucanto and other packages
([storacha#530](storacha/w3ui#530))
([8e7321b](storacha/w3ui@8e7321b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[5.0.0](storacha/w3ui@keyring-core-v4.2.0...keyring-core-v5.0.0)
(2023-07-25)


### ⚠ BREAKING CHANGES

* upgrade access client, ucanto and other packages
([storacha#530](storacha/w3ui#530))

### Features

* upgrade access client, ucanto and other packages
([storacha#530](storacha/w3ui#530))
([4449018](storacha/w3ui@4449018))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants