Skip to content

support for manage access dialog - #331

Open
SharonStrats wants to merge 3 commits into
stagingfrom
feat/access
Open

SharonStrats wants to merge 3 commits into
stagingfrom
feat/access

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Extended aclLogic to support the new manage access dialog by wiring in the necessary ACL helpers and access planning logic from @dokieli/web-access-control.

Alse added a function to resource logic to determine whether or not the resource is a webID.

Note: aclLogic will evolve as I complete the work, this is just to support the basic structure working.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Resolve the critical test-typecheck issue and the two moderate API and WebID issues.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds access-control planning APIs and WebID detection to support a manage-access dialog.

Changes:

  • Adds ACL discovery, grant, and public-read planning methods.
  • Re-exports access-control APIs and types.
  • Adds WebID detection and dependency updates.
File Summary / Findings
src/​types.ts Extends ACL and resource interfaces. Critical: Update typed test doubles or make additions optional to prevent typecheck-test failure.
src/​resource/​resourceLogic.ts Adds WebID detection. Moderate: Accept supported profile-card URL variants such as /profile/card.ttl.
src/​index.ts Exposes access-control APIs. Moderate: Re-export ACLContext.
src/​acl/​aclLogic.ts Wraps ACL discovery and planning helpers.
package.json Adds the access-control dependency.
package-lock.json Updates dependency resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/types.ts
Comment thread src/index.ts Outdated
Comment thread src/resource/resourceLogic.ts Outdated
SharonStrats and others added 2 commits September 27, 2026 10:51
Prompt: Add basic tests to cover the new acl logic functions that have been added

Co-authored-by: GPT-5.4 Mini <gpt-5.4-mini@openai.com>
it('recognizes only profile-card.ttl WebIDs', () => {
const resourceLogic = createResourceLogic(store, aclLogic, containerLogic, typeIndexLogic)

expect(resourceLogic.isWebId(sym('https://alice.example.com/profile/card.ttl#me'))).toBe(true)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@SharonStrats SharonStrats Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the recommendation came because of this

const club = sym('https://club.example.com/profile/card.ttl#it')
and this
expect(settingsAclBody).toContain('acl:agent <https://boby.example.com/profile/card.ttl#me>;')
.

I can remove it. I'm thinking that's probably the way to go as there isn't any other code like this. What are your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants