This commit is contained in:
Excellencedev committed 2025-12-18 09:17:07 +01:00
1 parent 9a69f65ee4
commit 43e96d5ead
9 files changed
+230 -1

No files matched your search

+13
View File
@@ -280,6 +280,19 @@ func GetActionsUserRepoPermission(ctx context.Context, repo *repo_model.Reposito
if err != nil || !exist {
return perm, err
}
// Check Organization Cross-Repo Access Policy
if repo.OwnerID == taskRepo.OwnerID && repo.Owner.IsOrganization() {
orgCfg, err := actions_model.GetOrgActionsConfig(ctx, repo.OwnerID)
if err != nil {
return perm, err
}
if !orgCfg.AllowCrossRepoAccess {
// Deny access if cross-repo is disabled in Org
return perm, nil
}
}
if !actionsCfg.IsCollaborativeOwner(taskRepo.OwnerID) || !taskRepo.IsPrivate {
// The task repo can access the current repo only if the task repo is private and
// the owner of the task repo is a collaborative owner of the current repo.