Sign. Part 1
This commit is contained in:
@@ -144,7 +144,7 @@ class ProjectsActions
|
||||
generate_linked_repos(id, proj_path, proj_name, prj_incl_path)
|
||||
end
|
||||
|
||||
def create_project(name, description, configuration)
|
||||
def create_project(name, description, configuration, nopublic)
|
||||
@error = nil
|
||||
ret_val = 0
|
||||
project_name = sanitize_rcptname(name)
|
||||
@@ -162,7 +162,7 @@ class ProjectsActions
|
||||
end
|
||||
if File.exist?(configuration)
|
||||
generate_config(nil, configuration, fname, project_name)
|
||||
@error = @db.proj_create(project_name, description)
|
||||
@error = @db.proj_create(project_name, description, nopublic)
|
||||
if @error.nil?
|
||||
created = true
|
||||
end
|
||||
@@ -361,10 +361,10 @@ class ProjectsActions
|
||||
@error = "Нельзя удалить git репозиторий с незавершенными сборками"
|
||||
else
|
||||
linked = @db.projects_with_current_as_link(prj_id)
|
||||
if linked.nil?
|
||||
if linked.nil? || linked.length == 0
|
||||
proj_path = get_project_path(prj_id)
|
||||
FileUtils.rm_rf(proj_path, secure: true)
|
||||
@db.delete_project(prj_id, git_id)
|
||||
@db.delete_project(prj_id)
|
||||
else
|
||||
@error = "На текущий проект ссылаются другие проекты. Удаление запрещено"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user