Skip to content

WIP: Personal snippets comments

What does this MR do?

It adds a possibility to add notes to personal snippets.

Are there points in the code the reviewer needs to double check?

This is a bit bigger change and multiple parts of system were touched. Please check especially

  • adding notes for project snippets
  • uploading files - not only for personal snippets but also for normal snippets / notes
  • permissions - logged user who has access to a personal snippet can write notes (all users for public/internal snippets, only owner for private snippet), all users who have access to a snippet can read notes or download files
  • Snippets::UploadsController - not sure if the inheritance from Project::UploadsController is correct here but I didn't want to duplicate code, concern might help here? (similar might be for other classes, will go through them again)

What is not included in this Merge Request (for discussion: include it here or create separated issues?)

  • API support was not added
  • notes discussion not supported
  • todos not integrated, notes can't be resolved (should they be resolvable? if so additional changes will be needed)
  • mentions not working yet - see discussion - should this be part of this MR?

Why was this MR needed?

Requested in #15654 (closed)

Screenshots (if relevant)

Screen_Shot_2016-11-16_at_9.12.36

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #15654 (closed)

What possible problems were found during the implementation

No issues created yet for these possible bugs:

  • project/personal snippets - no possibility to delete attachment for notes
  • project snippets - when a note is created and a user who does not have an access to the snippet is mentioned he/she receives the email anyway (and then sees 404 page)
Edited by 🤖 GitLab Bot 🤖

Merge request reports