diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index c026b22e3ee..e0e304a361c 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -829,7 +829,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /app/assets/javascripts/runner/components/registration/registration_token.vue @gitlab-org/manage/authentication-and-authorization /app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue @gitlab-org/manage/authentication-and-authorization /app/assets/javascripts/runner/components/search_tokens/ @gitlab-org/manage/authentication-and-authorization -/app/assets/javascripts/static_site_editor/rich_content_editor/services/renderers/build_uneditable_token.js @gitlab-org/manage/authentication-and-authorization /app/assets/javascripts/token_access/components/ @gitlab-org/manage/authentication-and-authorization /app/assets/javascripts/token_access/index.js @gitlab-org/manage/authentication-and-authorization /app/assets/stylesheets/page_bundles/profile_two_factor_auth.scss @gitlab-org/manage/authentication-and-authorization diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml index ae5aad075f8..bc647dd0e79 100644 --- a/.rubocop_todo/rspec/context_wording.yml +++ b/.rubocop_todo/rspec/context_wording.yml @@ -1383,7 +1383,6 @@ RSpec/ContextWording: - 'spec/controllers/projects/settings/repository_controller_spec.rb' - 'spec/controllers/projects/snippets_controller_spec.rb' - 'spec/controllers/projects/starrers_controller_spec.rb' - - 'spec/controllers/projects/static_site_editor_controller_spec.rb' - 'spec/controllers/projects/tags_controller_spec.rb' - 'spec/controllers/projects/todos_controller_spec.rb' - 'spec/controllers/projects/tree_controller_spec.rb' @@ -2511,7 +2510,6 @@ RSpec/ContextWording: - 'spec/lib/gitlab/spamcheck/client_spec.rb' - 'spec/lib/gitlab/sql/pattern_spec.rb' - 'spec/lib/gitlab/ssh_public_key_spec.rb' - - 'spec/lib/gitlab/static_site_editor/config/file_config/entry/mount_spec.rb' - 'spec/lib/gitlab/submodule_links_spec.rb' - 'spec/lib/gitlab/subscription_portal_spec.rb' - 'spec/lib/gitlab/suggestions/commit_message_spec.rb' @@ -3513,7 +3511,6 @@ RSpec/ContextWording: - 'spec/services/spam/ham_service_spec.rb' - 'spec/services/spam/spam_action_service_spec.rb' - 'spec/services/spam/spam_verdict_service_spec.rb' - - 'spec/services/static_site_editor/config_service_spec.rb' - 'spec/services/submodules/update_service_spec.rb' - 'spec/services/suggestions/apply_service_spec.rb' - 'spec/services/suggestions/create_service_spec.rb' diff --git a/.rubocop_todo/rspec/return_from_stub.yml b/.rubocop_todo/rspec/return_from_stub.yml index da5ed01cafa..2fb01b855be 100644 --- a/.rubocop_todo/rspec/return_from_stub.yml +++ b/.rubocop_todo/rspec/return_from_stub.yml @@ -286,7 +286,6 @@ RSpec/ReturnFromStub: - 'spec/services/projects/in_product_marketing_campaign_emails_service_spec.rb' - 'spec/services/projects/update_remote_mirror_service_spec.rb' - 'spec/services/projects/update_service_spec.rb' - - 'spec/services/static_site_editor/config_service_spec.rb' - 'spec/services/suggestions/apply_service_spec.rb' - 'spec/services/suggestions/create_service_spec.rb' - 'spec/services/verify_pages_domain_service_spec.rb' diff --git a/.rubocop_todo/style/class_and_module_children.yml b/.rubocop_todo/style/class_and_module_children.yml index 5a4a58f2f6c..14f6ccad44f 100644 --- a/.rubocop_todo/style/class_and_module_children.yml +++ b/.rubocop_todo/style/class_and_module_children.yml @@ -225,7 +225,6 @@ Style/ClassAndModuleChildren: - 'app/controllers/projects/snippets/blobs_controller.rb' - 'app/controllers/projects/snippets_controller.rb' - 'app/controllers/projects/starrers_controller.rb' - - 'app/controllers/projects/static_site_editor_controller.rb' - 'app/controllers/projects/tags/releases_controller.rb' - 'app/controllers/projects/tags_controller.rb' - 'app/controllers/projects/templates_controller.rb' diff --git a/app/assets/javascripts/notes/components/comment_field_layout.vue b/app/assets/javascripts/notes/components/comment_field_layout.vue index 9638c20e28c..84bda1b0b5c 100644 --- a/app/assets/javascripts/notes/components/comment_field_layout.vue +++ b/app/assets/javascripts/notes/components/comment_field_layout.vue @@ -14,7 +14,7 @@ export default { type: Object, required: true, }, - noteIsConfidential: { + isInternalNote: { type: Boolean, required: false, default: false, @@ -44,7 +44,7 @@ export default { return this.noteableData.issue_email_participants?.map(({ email }) => email) || []; }, showEmailParticipantsWarning() { - return this.emailParticipants.length && !this.noteIsConfidential; + return this.emailParticipants.length && !this.isInternalNote; }, }, }; diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 8ef071034e5..f397a86a368 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -60,7 +60,7 @@ export default { note: '', noteType: constants.COMMENT, errors: [], - noteIsConfidential: false, + noteIsInternal: false, isSubmitting: false, }; }, @@ -91,13 +91,13 @@ export default { }, commentButtonTitle() { const { comment, internalComment, startThread, startInternalThread } = this.$options.i18n; - if (this.noteIsConfidential) { + if (this.noteIsInternal) { return this.noteType === constants.COMMENT ? internalComment : startInternalThread; } return this.noteType === constants.COMMENT ? comment : startThread; }, textareaPlaceholder() { - return this.noteIsConfidential + return this.noteIsInternal ? this.$options.i18n.bodyPlaceholderInternal : this.$options.i18n.bodyPlaceholder; }, @@ -110,7 +110,7 @@ export default { canCreateNote() { return this.getNoteableData.current_user.can_create_note; }, - canSetConfidential() { + canSetInternalNote() { return this.getNoteableData.current_user.can_update && (this.isIssue || this.isEpic); }, issueActionButtonTitle() { @@ -172,7 +172,7 @@ export default { trackingLabel() { return slugifyWithUnderscore(`${this.commentButtonTitle} button`); }, - confidentialNotesEnabled() { + internalNotesEnabled() { return Boolean(this.glFeatures.confidentialNotes); }, disableSubmitButton() { @@ -217,7 +217,11 @@ export default { note: { noteable_type: this.noteableType, noteable_id: this.getNoteableData.id, - confidential: this.noteIsConfidential, + // Internal notes were identified as `confidential` + // before we decided to treat them as _internal_ + // so now until API is updated we need to use `confidential` + // in request payload. + confidential: this.noteIsInternal, note: this.note, }, merge_request_diff_head_sha: this.getNoteableData.diff_head_sha, @@ -292,7 +296,7 @@ export default { if (shouldClear) { this.note = ''; - this.noteIsConfidential = false; + this.noteIsInternal = false; this.resizeTextarea(); this.$refs.markdownField.previewMarkdown = false; } @@ -356,7 +360,7 @@ export default { {{ __('Internal note') }} diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index 3b73095efcf..af0c1e9619e 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -447,7 +447,7 @@ export default { :author="author" :created-at="note.created_at" :note-id="note.id" - :is-confidential="note.confidential" + :is-internal-note="note.confidential" :noteable-type="noteableType" >