Changes between Initial Version and Version 1 of AdminRemovesAStory


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AdminRemovesAStory

    v1 v1  
     1==  Admin Removes a Story
     2
     3=== Actor: **Admin**
     4An admin removes an inappropriate published story from the platform after reviewing it for content violations.
     5
     6**1.** The admin navigates to the content moderation dashboard.
     7
     8**2.** The system displays all published stories with their details.
     9{{{#!sql
     10SELECT s.story_id, s.short_description, s.mature_content,
     11       u.username AS author, st.status,
     12       COUNT(DISTINCT c.comment_id) AS total_comments,
     13       s.created_at
     14FROM STORY s
     15JOIN USERS u ON s.user_id = u.user_id
     16JOIN STATUS st ON s.story_id = st.story_id
     17LEFT JOIN COMMENT c ON s.story_id = c.story_id
     18WHERE st.status = 'published'
     19GROUP BY s.story_id, u.username, st.status
     20ORDER BY s.created_at DESC;
     21}}}
     22
     23**3.** The admin selects a story flagged for inappropriate content and reviews it.
     24
     25**4.** The admin confirms the story violates platform rules and proceeds to delete it.
     26
     27**5.** The system deletes the story, and all related records are automatically removed via CASCADE.
     28{{{#!sql
     29DELETE FROM STORY
     30WHERE story_id = 3;
     31}}}
     32
     33**6.** The system notifies the writer that their story was removed due to a policy violation.
     34{{{#!sql
     35INSERT INTO NOTIFICATION (content, is_read, created_at)
     36VALUES ('Your story "Moonlight Promises" has been removed by an administrator due to a content policy violation.', FALSE, CURRENT_TIMESTAMP);
     37}}}
     38
     39**7.** The system logs the action and confirms the story is no longer visible on the platform.