Enable orgs
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
5dfcfc542e
commit
6a168ba813
22 changed files with 125 additions and 77 deletions
|
|
@ -268,7 +268,11 @@ func (s *sqlDatabase) getGiteaCredentialsByName(ctx context.Context, tx *gorm.DB
|
|||
if detailed {
|
||||
q = q.
|
||||
Preload("Repositories").
|
||||
Preload("Organizations")
|
||||
Preload("Organizations").
|
||||
Preload("Repositories.GiteaCredentials").
|
||||
Preload("Organizations.GiteaCredentials").
|
||||
Preload("Repositories.Credentials").
|
||||
Preload("Organizations.Credentials")
|
||||
}
|
||||
|
||||
userID, err := getUIDFromContext(ctx)
|
||||
|
|
@ -304,7 +308,11 @@ func (s *sqlDatabase) GetGiteaCredentials(ctx context.Context, id uint, detailed
|
|||
if detailed {
|
||||
q = q.
|
||||
Preload("Repositories").
|
||||
Preload("Organizations")
|
||||
Preload("Organizations").
|
||||
Preload("Repositories.GiteaCredentials").
|
||||
Preload("Organizations.GiteaCredentials").
|
||||
Preload("Repositories.Credentials").
|
||||
Preload("Organizations.Credentials")
|
||||
}
|
||||
|
||||
if !auth.IsAdmin(ctx) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue