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
Aucune clé n'a été trouvée pour cette signature dans la base de données
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 UserStatusTrusted = 1
// UserStatusModerator : Int for User status moderator // UserStatusModerator : Int for User status moderator
UserStatusModerator = 2 UserStatusModerator = 2
// UserStatusScrapped : Int for User status scrapped // UserStatusScraped : Int for User status scrapped
UserStatusScrapped = 3 UserStatusScraped = 3
) )
// User model // User model
@ -95,9 +95,9 @@ func (u *User) IsModerator() bool {
return u.Status == UserStatusModerator return u.Status == UserStatusModerator
} }
// IsScrapped : Return true if user is a scrapped user // IsScraped : Return true if user is a scrapped user
func (u *User) IsScrapped() bool { func (u *User) IsScraped() bool {
return u.Status == UserStatusScrapped return u.Status == UserStatusScraped
} }
// GetUnreadNotifications : Get unread notifications from a user // 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() { if user.IsBanned() {
return http.StatusUnauthorized, errors.New("Account banned") 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") 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" return "Banned"
case model.UserStatusMember: case model.UserStatusMember:
return "Member" return "Member"
case model.UserStatusScrapped: case model.UserStatusScraped:
return "Member" return "Member"
case model.UserStatusTrusted: case model.UserStatusTrusted:
return "Trusted Member" return "Trusted Member"

Voir le fichier

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

Voir le fichier

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