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
df044542
Commit
df044542
authored
Feb 25, 2019
by
John Cai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project set_repository_writable!
parent
4a5b3707
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
app/models/project.rb
app/models/project.rb
+1
-1
changelogs/unreleased/jc-fix-set-project-writable.yml
changelogs/unreleased/jc-fix-set-project-writable.yml
+5
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+10
-0
No files found.
app/models/project.rb
View file @
df044542
...
...
@@ -1838,7 +1838,7 @@ class Project < ActiveRecord::Base
# Set repository as writable again
def
set_repository_writable!
with_lock
do
update_column
(
repository_read_only
,
false
)
update_column
(
:
repository_read_only
,
false
)
end
end
...
...
changelogs/unreleased/jc-fix-set-project-writable.yml
0 → 100644
View file @
df044542
---
title
:
Fix method to mark a project repository as writable
merge_request
:
25546
author
:
type
:
fixed
spec/models/project_spec.rb
View file @
df044542
...
...
@@ -2511,6 +2511,16 @@ describe Project do
end
end
describe
'#set_repository_writable!'
do
it
'sets repository_read_only to false'
do
project
=
create
(
:project
,
:read_only
)
expect
{
project
.
set_repository_writable!
}
.
to
change
(
project
,
:repository_read_only
)
.
from
(
true
).
to
(
false
)
end
end
describe
'#pushes_since_gc'
do
let
(
:project
)
{
create
(
:project
)
}
...
...
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