mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 20:43:24 +02:00
Add UnitCommitStatus
This commit is contained in:
1 parent
35f68afdf6
commit
7c5cc63dc6
3 files changed
+18
-48
No files matched your search
@@ -367,15 +367,3 @@ 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
|
||||
}
|
||||
Reference in new issue
Block a user