mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: reason for not being able to delete a staff user's posts was wrong in admin
This commit is contained in:
parent
85797ccef9
commit
ddbe1c017b
2 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,9 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
|
||||
deleteAllPostsExplanation: function() {
|
||||
if (!this.get('can_delete_all_posts')) {
|
||||
if (this.get('deleteForbidden') && this.get('staff')) {
|
||||
return I18n.t('admin.user.delete_posts_forbidden_because_staff');
|
||||
}
|
||||
if (this.get('post_count') > Discourse.SiteSettings.delete_all_posts_max) {
|
||||
return I18n.t('admin.user.cant_delete_all_too_many_posts', {count: Discourse.SiteSettings.delete_all_posts_max});
|
||||
} else {
|
||||
|
@ -65,7 +68,7 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
}.property('can_delete_all_posts'),
|
||||
}.property('can_delete_all_posts', 'deleteForbidden'),
|
||||
|
||||
deleteAllPosts: function() {
|
||||
var user = this;
|
||||
|
|
|
@ -2052,6 +2052,7 @@ en:
|
|||
time_read: "Read Time"
|
||||
delete: "Delete User"
|
||||
delete_forbidden_because_staff: "Admins and moderators can't be deleted."
|
||||
delete_posts_forbidden_because_staff: "Can't delete all posts of admins and moderators."
|
||||
delete_forbidden:
|
||||
one: "Users can't be deleted if they have posts. Delete all posts before trying to delete a user. (Posts older than %{count} day old can't be deleted.)"
|
||||
other: "Users can't be deleted if they have posts. Delete all posts before trying to delete a user. (Posts older than %{count} days old can't be deleted.)"
|
||||
|
|
Loading…
Reference in a new issue