reqRepoWriter makes sure the context user has at least write access to the repository.
()
| 136 | |
| 137 | // reqRepoWriter makes sure the context user has at least write access to the repository. |
| 138 | func reqRepoWriter() macaron.Handler { |
| 139 | return func(c *context.Context) { |
| 140 | if !c.Repo.IsWriter() { |
| 141 | c.Status(http.StatusForbidden) |
| 142 | return |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // reqRepoAdmin makes sure the context user has at least admin access to the repository. |
| 148 | func reqRepoAdmin() macaron.Handler { |
no test coverage detected