Skip to content

Conversation

Copy link

Copilot AI commented Oct 29, 2025

Implementation plan for relationship-based authorization system:

  • Create a new sample application for relationship-based authorization
  • Define domain models (Prompt, Collection, User, Relationship entities)
  • Implement relationship types (Owner, Maintainer)
  • Create authorization service with entitlements pattern
  • Implement authorization rules:
    • Owners can edit and remove prompts/collections
    • Maintainers can only edit prompts/collections
    • Collection owners are owners of all prompts in collection
    • Collection maintainers are maintainers of all prompts in collection
    • Can only add prompts to collection if owner of both
  • Add unit tests for authorization logic
  • Build and validate the implementation
Original prompt

We should introduce relation ship based authorization in the application. I want to be able to assign users as maintainers to collections or prompts. I also would like to be able to assign users as owners to prompts or collections. I then want to use an entitlements pattern to ensure that owners can remove and edit prompts or collections and maintainers can only edit prompts and collection details. Whenever someone is a maintainer of a collection they're also a maintainer of the prompts in the collection. Whenever someone is an owner of a collection they're also an owner of the prompts in the collection. We must make sure you can only add prompts to a collection when you're the owner of the prompt and the collection you want them added to.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

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