Owner can enable public mode for project

This commit is contained in:
Dmitriy Zaporozhets 2013-01-16 16:54:01 +02:00
parent a39c910619
commit 729088a7af
6 changed files with 19 additions and 4 deletions

View file

@ -1,6 +1,7 @@
class ProjectUpdateContext < BaseContext
def execute(role = :default)
namespace_id = params[:project].delete(:namespace_id)
params[:project].delete(:public) unless can?(current_user, :change_public_mode, project)
allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin