Phase 2 of migrating repo namespaces to referencing user objects, backfilling the rows without a value for namespace_user, and changing all accesses to go through the namespace_user object. All tests are passing, manual testing still required.
This commit is contained in:
parent
6070c251ae
commit
03190efde3
19 changed files with 373 additions and 305 deletions
|
@ -420,7 +420,7 @@ def put_repository_auth(namespace, repository):
|
|||
def get_search():
|
||||
def result_view(repo):
|
||||
return {
|
||||
"name": repo.namespace + '/' + repo.name,
|
||||
"name": repo.namespace_user.username + '/' + repo.name,
|
||||
"description": repo.description
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ def get_search():
|
|||
|
||||
results = [result_view(repo) for repo in matching
|
||||
if (repo.visibility.name == 'public' or
|
||||
ReadRepositoryPermission(repo.namespace, repo.name).can())]
|
||||
ReadRepositoryPermission(repo.namespace_user.username, repo.name).can())]
|
||||
|
||||
data = {
|
||||
"query": query,
|
||||
|
|
Reference in a new issue