Revert "Add UnitCommitStatus"

This reverts commit 7c5cc63dc6.
This commit is contained in:
Norbert Szulc
2025-08-30 13:13:22 +00:00
parent 7c5cc63dc6
commit d9e9f8878d
3 changed files with 48 additions and 18 deletions
+12
View File
@@ -367,3 +367,15 @@ func (ctx *APIContext) IsUserRepoAdmin() bool {
func (ctx *APIContext) IsUserRepoWriter(unitTypes []unit.Type) bool {
return slices.ContainsFunc(unitTypes, ctx.Repo.CanWrite)
}
// IsUserRepoWriter returns true if current user has write commit status privilege in current repo
func (ctx *APIContext) IsUserCommitStatusWriter(unitTypes []unit.Type) bool {
for _, unitType := range unitTypes {
// TODO
if ctx.Repo.CanWrite(unitType) {
return true
}
}
return false
}