mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 09:28:47 +00:00
Merge pull request #83 from fudanchii/migration
Migration system for sqlite
This commit is contained in:
@@ -41,7 +41,7 @@ func (h UserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
// AdminHandler wraps the default http.HandlerFunc to include
|
||||
// the currently authenticated User in the method signature,
|
||||
// in addition to handling an error as the return value. It also
|
||||
// verifies the user has Administrative priveleges.
|
||||
// verifies the user has Administrative privileges.
|
||||
type AdminHandler func(w http.ResponseWriter, r *http.Request, user *User) error
|
||||
|
||||
func (h AdminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -51,7 +51,7 @@ func (h AdminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// User MUST have administrative priveleges in order
|
||||
// User MUST have administrative privileges in order
|
||||
// to execute the handler.
|
||||
if user.Admin == false {
|
||||
RenderNotFound(w)
|
||||
|
Reference in New Issue
Block a user