mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 13:00:10 +02:00
Clarify permission "HasAccess" behavior (#30585)
Follow #30495 "HasAccess" behavior wasn't clear, to make it clear: * Use a new name `HasAnyUnitAccess`, it will be easier to review related code and permission problems. * Separate everyone access mode to a separate field, then all calls to HasAccess are reverted to old behavior before #30495. * Add new tests. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
1 parent
89e39872ff
commit
48d4580dd5
13 files changed
+96
-41
No files matched your search
@@ -21,7 +21,7 @@ func ToPackage(ctx context.Context, pd *packages.PackageDescriptor, doer *user_m
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if permission.HasAccess() {
|
||||
if permission.HasAnyUnitAccess() {
|
||||
repo = ToRepo(ctx, pd.Repository, permission)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user