Changes between Initial Version and Version 1 of WriterViewsStoryCollaborationDetails


Ignore:
Timestamp:
03/05/26 15:12:33 (2 weeks ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WriterViewsStoryCollaborationDetails

    v1 v1  
     1==  Writer Views Story Collaboration Details
     2
     3=== Authors: **Writer**
     4A writer views all current collaborators on their story, including their roles and permission levels, and can manage the collaboration.
     5
     6**1.** The writer navigates to their story management page and selects "Manage Collaborators".
     7
     8**2.** The system retrieves all collaborators and their details for the story.
     9{{{#!sql
     10SELECT u.username, u.name, u.surname, r.roles, p.permission_level, c.created_at
     11FROM COLLABORATION c
     12JOIN USERS u ON c.user_id = u.user_id
     13JOIN ROLES r ON c.user_id = r.user_id AND c.story_id = r.story_id
     14JOIN PERMISSION_LEVEL p ON c.user_id = p.user_id AND c.story_id = p.story_id
     15WHERE c.story_id = 5
     16ORDER BY p.permission_level DESC;
     17}}}
     18
     19**3.** The writer decides to update a collaborator's permission level.
     20{{{#!sql
     21UPDATE PERMISSION_LEVEL
     22SET permission_level = 3
     23WHERE user_id = 9 AND story_id = 5;
     24}}}
     25
     26**4.** The writer decides to remove a collaborator from the story entirely.
     27{{{#!sql
     28DELETE FROM COLLABORATION
     29WHERE user_id = 9 AND story_id = 5;
     30}}}
     31
     32**5.** The system confirms the changes and the ROLES and PERMISSION_LEVEL records are automatically removed via CASCADE.
     33
     34**6.** The system sends a notification to the removed collaborator.
     35{{{#!sql
     36INSERT INTO NOTIFICATION (content, is_read, created_at)
     37VALUES ('You have been removed as a collaborator from "Letters from Constantinople"', FALSE, CURRENT_TIMESTAMP);
     38}}}
     39}}}