Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Try to fix travis

Cette révision appartient à :
sfan5 2017-05-08 23:00:43 +02:00
Parent 5bdd160d61
révision 5cbf5fc537

Voir le fichier

@ -10,14 +10,7 @@ import (
// HasAdmin checks that user has an admin permission.
func HasAdmin(user *model.User) bool {
name := "admin"
for _, role := range user.Roles {
log.Debugf("HasAdmin role.Name : %s", role.Name)
if role.Name == name {
return true
}
}
return false
return user.Status == 2
}
// CurrentOrAdmin check that user has admin permission or user is the current user.