aboutsummaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index 80ac3e16f8..d790cd6678 100644
--- a/models/action.go
+++ b/models/action.go
@@ -352,7 +352,7 @@ func activityQueryCondition(opts GetFeedsOptions) (builder.Cond, error) {
// check readable repositories by doer/actor
if opts.Actor == nil || !opts.Actor.IsAdmin {
if opts.RequestedUser.IsOrganization() {
- env, err := opts.RequestedUser.AccessibleReposEnv(actorID)
+ env, err := OrgFromUser(opts.RequestedUser).AccessibleReposEnv(actorID)
if err != nil {
return nil, fmt.Errorf("AccessibleReposEnv: %v", err)
}
@@ -366,7 +366,7 @@ func activityQueryCondition(opts GetFeedsOptions) (builder.Cond, error) {
}
if opts.RequestedTeam != nil {
- env := opts.RequestedUser.AccessibleTeamReposEnv(opts.RequestedTeam)
+ env := OrgFromUser(opts.RequestedUser).AccessibleTeamReposEnv(opts.RequestedTeam)
teamRepoIDs, err := env.RepoIDs(1, opts.RequestedUser.NumRepos)
if err != nil {
return nil, fmt.Errorf("GetTeamRepositories: %v", err)