Skip to content

resource.canWrite() should use the agent configured on the store #1066

Open
@Polleps

Description

@Polleps

If you set up a store with an agent, fetch a resource, then check resource.canWrite() it will return false because you did not pass an agent. But when you then edit the resource and save it it will succeed since it used the agent set in the store to sign the commit.
I think the user expects resource.canWrite() to use the store agent because other methods do this.

Also the docs suggest this is the case, I think this happened because I changed useCanWrite to work like this but not resource.canWrite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions