Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
projects.thm.de
GitLab
Commits
df044542
Commit
df044542
authored
Feb 25, 2019
by
John Cai
Browse files
Fix project set_repository_writable!
parent
4a5b3707
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
df044542
...
...
@@ -1838,7 +1838,7 @@ def set_repository_read_only!
# 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 @@
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
)
}
...
...
Daniel Gerhardt
@dgrh99
mentioned in commit
8cb05f91
·
Mar 25, 2019
mentioned in commit
8cb05f91
mentioned in commit 8cb05f91568cbb61c14cc4618d9c6d821b54b8d8
Toggle commit list
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