summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorMarius Mathiesen <marius@shortcut.no>2010-02-18 14:10:02 +0100
committerMarius Mathiesen <marius@shortcut.no>2010-02-18 14:10:02 +0100
commit0ed4bc3c9a088eb66f1776f5c5211c91dbaef619 (patch)
tree3e59500b32f6be6a225f756cc371ef28af198f67 /app/models
parent9b1e862350c8c21fa9d9a7b08f63fab0a30a2a60 (diff)
downloadgitorious-mainline-outdated-master.zip
gitorious-mainline-outdated-master.tar.gz
gitorious-mainline-outdated-master.tar.bz2
Bugfix: when changing project ownership to a group, give admin rights to all mainline repositoriesHEADorigin/masterorigin/HEADmaster
Until now, committerships created for these repositories would have a nil permissions mask.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 4824271..16d4a39 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -289,7 +289,9 @@ class Project < ActiveRecord::Base
self.wiki_repository.owner = another_owner
repositories.mainlines.each {|repo|
- repo.committerships.create!(:committer => another_owner, :creator_id => self.owner_id_was)
+ c = repo.committerships.create!(:committer => another_owner,:creator_id => self.owner_id_was)
+ c.build_permissions(:review, :commit, :admin)
+ c.save!
}
end
end