Owner can enable public mode for project
This commit is contained in:
parent
a39c910619
commit
729088a7af
6 changed files with 19 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue