Don't show approval on admin user page if the site doesn't require approval of users (must_approve_users)

This commit is contained in:
Neil Lalonde 2013-09-09 12:21:47 -04:00
parent 360b8e32ca
commit 199584824b
2 changed files with 30 additions and 24 deletions

View File

@ -22,5 +22,9 @@ Discourse.AdminUserController = Discourse.ObjectController.extend({
});
this.toggleTitleEdit();
}
},
showApproval: function() {
return Discourse.SiteSettings.must_approve_users;
}.property()
});

View File

@ -64,6 +64,7 @@
<section class='details'>
<h1>{{i18n admin.user.permissions}}</h1>
{{#if showApproval}}
<div class='display-row'>
<div class='field'>{{i18n admin.users.approved}}</div>
<div class='value'>
@ -90,6 +91,7 @@
{{/if}}
</div>
</div>
{{/if}}
<div class='display-row'>
<div class='field'>{{i18n admin.users.active}}</div>