Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
08d4f0d6
Commit
08d4f0d6
authored
Jan 18, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't delete assigned MRs/issues when user is deleted
parent
d147688a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/models/user.rb
app/models/user.rb
+3
-2
changelogs/unreleased/dont-delete-assigned-issuables.yml
changelogs/unreleased/dont-delete-assigned-issuables.yml
+4
-0
No files found.
app/models/user.rb
View file @
08d4f0d6
...
...
@@ -83,8 +83,6 @@ class User < ActiveRecord::Base
has_many
:events
,
dependent: :destroy
,
foreign_key: :author_id
has_many
:subscriptions
,
dependent: :destroy
has_many
:recent_events
,
->
{
order
"id DESC"
},
foreign_key: :author_id
,
class_name:
"Event"
has_many
:assigned_issues
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"Issue"
has_many
:assigned_merge_requests
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"MergeRequest"
has_many
:oauth_applications
,
class_name:
'Doorkeeper::Application'
,
as: :owner
,
dependent: :destroy
has_one
:abuse_report
,
dependent: :destroy
has_many
:spam_logs
,
dependent: :destroy
...
...
@@ -94,6 +92,9 @@ class User < ActiveRecord::Base
has_many
:notification_settings
,
dependent: :destroy
has_many
:award_emoji
,
dependent: :destroy
has_many
:assigned_issues
,
dependent: :nullify
,
foreign_key: :assignee_id
,
class_name:
"Issue"
has_many
:assigned_merge_requests
,
dependent: :nullify
,
foreign_key: :assignee_id
,
class_name:
"MergeRequest"
#
# Validations
#
...
...
changelogs/unreleased/dont-delete-assigned-issuables.yml
0 → 100644
View file @
08d4f0d6
---
title
:
Don't delete assigned MRs/issues when user is deleted
merge_request
:
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment