解绑时取消激活该用户的所有项目

This commit is contained in:
moshenglv
2021-01-06 14:45:34 +08:00
parent f7a5157788
commit cbe5b3afde
3 changed files with 17 additions and 0 deletions

View File

@@ -14,6 +14,12 @@ class Ci::Repo < Ci::RemoteBase
[user, repo]
end
def self.find_all_with_namespace(namespace_path)
logger.info "########namespace_path: #{namespace_path}"
repos = Ci::Repo.where(repo_namespace: namespace_path)
return repos
end
def activate!(ci_user_id)
update(repo_active: 1,
repo_signer: generate_code,