Sign. Part 1

This commit is contained in:
alexey
2025-03-21 00:02:18 +03:00
parent a57d0a0f15
commit c6a89e7be1
12 changed files with 107 additions and 16 deletions

View File

@@ -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