Skip to content

Collaborative signal editing (user groups etc) #9

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

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

happy-devs
Copy link
Collaborator

Summary

This request adds collaborative editing capabilities to signals in draft mode. It introduces user groups and signal collaborator features, allowing multiple users to collaborate on a signal before it's published.

New Features

  • Added UserGroup entity model for managing groups of users
  • Updated Signal entity with is_draft and collaborators fields
  • Created database tables for user groups and signal collaborators
  • Added CRUD operations for user groups and group membership
  • Implemented methods for managing signal collaborators
  • Added permission system to control who can edit a signal
  • Added API endpoints for all group and collaborator operations
  • Added comprehensive test coverage for new functionality

Bug Fixes

No bug fixes.

Checklist

  • [] I have read the contribution guidelines.
  • [] My code follows the style guidelines of this project.
  • [] I have performed a self-review of my code.
  • [] I have commented my code, particularly in hard-to-understand areas.
  • [] I have added tests that prove my fix is effective or that my feature works.
  • [] I have added required dependencies to requirements.txt
  • [] I have updated the documentation (if applicable).

Additional Notes

Database Changes

This PR introduces several new database tables:

  • user_groups - For managing groups of users
  • user_group_members - For managing group membership
  • signal_collaborators - For tracking individual user collaborators
  • signal_collaborator_groups - For tracking group collaborators
  • Added is_draft column to signals table

A SQL migration script is provided in migrations/signal_collaborators.sql.

Key Architecture Decisions

  1. Signals default to draft mode (is_draft = true) to allow collaborative work before publication
  2. Collaborators can be individual users or entire groups
  3. Permission checks cascade - allows user edit access if:
    • They created the signal
    • They are in the collaborators list
    • They are part of a group in the collaborators list
  4. Admin users maintain full access to all signals

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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants