Stop using deprecated HasAdmin() function
Cette révision appartient à :
Parent
8f2bf884ab
révision
b036780725
1 fichiers modifiés avec 1 ajouts et 1 suppressions
|
@ -25,7 +25,7 @@ func TorrentDeleteUserPanel(c *gin.Context) {
|
|||
torrent.Uploader = &models.User{}
|
||||
}
|
||||
_, username := torrents.HideUser(torrent.UploaderID, torrent.Uploader.Username, torrent.Hidden)
|
||||
if currentUser.HasAdmin() { // We hide username on log activity if user is not admin and torrent is hidden
|
||||
if currentUser.IsModerator() { // We hide username on log activity if user is not admin and torrent is hidden
|
||||
activities.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_deleted_by", strconv.Itoa(int(torrent.ID)), username, currentUser.Username)
|
||||
} else {
|
||||
activities.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_deleted_by", strconv.Itoa(int(torrent.ID)), username, username)
|
||||
|
|
Référencer dans un nouveau ticket