Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
PantsuDev 2017-06-07 11:14:57 +10:00
Parent 752544a52c
révision 994ea62eab
Signature inconnue de Forgejo
ID de la clé GPG: C0A42175139840D6
5 fichiers modifiés avec 10 ajouts et 10 suppressions

Voir le fichier

@ -17,8 +17,8 @@ const (
UserStatusTrusted = 1
// UserStatusModerator : Int for User status moderator
UserStatusModerator = 2
// UserStatusScrapped : Int for User status scrapped
UserStatusScrapped = 3
// UserStatusScraped : Int for User status scrapped
UserStatusScraped = 3
)
// User model
@ -95,9 +95,9 @@ func (u *User) IsModerator() bool {
return u.Status == UserStatusModerator
}
// IsScrapped : Return true if user is a scrapped user
func (u *User) IsScrapped() bool {
return u.Status == UserStatusScrapped
// IsScraped : Return true if user is a scrapped user
func (u *User) IsScraped() bool {
return u.Status == UserStatusScraped
}
// GetUnreadNotifications : Get unread notifications from a user

Voir le fichier

@ -106,7 +106,7 @@ func SetCookieHandler(w http.ResponseWriter, r *http.Request, email string, pass
if user.IsBanned() {
return http.StatusUnauthorized, errors.New("Account banned")
}
if user.IsScrapped() {
if user.IsScraped() {
return http.StatusUnauthorized, errors.New("Account need activation from Moderators, please contact us")
}

Voir le fichier

@ -36,7 +36,7 @@ func GetRole(user *model.User) string {
return "Banned"
case model.UserStatusMember:
return "Member"
case model.UserStatusScrapped:
case model.UserStatusScraped:
return "Member"
case model.UserStatusTrusted:
return "Trusted Member"

Voir le fichier

@ -173,7 +173,7 @@
{{ if eq .Status 2 }} <!-- just so that it shows correctly -->
<option value="2" selected>{{ call $.T "moderator"}}</option>
{{end}}
<option value="3" {{ if eq .Status 3 }}selected{{end}}>{{ call $.T "scrapped_user"}}</option>
<option value="3" {{ if eq .Status 3 }}selected{{end}}>{{ call $.T "scraped_user"}}</option>
</select>
{{ range (index $.FormErrors "status")}}
<p class="error-text">{{ . }}</p>

Voir le fichier

@ -552,8 +552,8 @@
"translation": "Trusted member"
},
{
"id": "scrapped_user",
"translation": "Scrapped user"
"id": "scraped_user",
"translation": "Scraped user"
},
{
"id": "moderator",