FIX: don't allow moderators to save category tracking settings
This commit is contained in:
parent
23dfddbfb4
commit
e050308f36
|
@ -9,6 +9,11 @@ export default Ember.Controller.extend(PreferencesTabController, {
|
|||
'watched_first_post_category_ids'
|
||||
],
|
||||
|
||||
canSave: function() {
|
||||
return this.get('currentUser.id') === this.get('model.id') ||
|
||||
this.get('currentUser.admin');
|
||||
}.property(),
|
||||
|
||||
actions: {
|
||||
save() {
|
||||
this.set('saved', false);
|
||||
|
|
|
@ -43,8 +43,12 @@
|
|||
|
||||
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}
|
||||
|
||||
{{#if canSave}}
|
||||
<div class="control-group save-button">
|
||||
<div class="controls">
|
||||
{{partial 'user/preferences/save-button'}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{i18n 'user.no_category_access'}}
|
||||
{{/if}}
|
||||
|
|
|
@ -622,6 +622,7 @@ en:
|
|||
|
||||
muted_categories: "Muted"
|
||||
muted_categories_instructions: "You will not be notified of anything about new topics in these categories, and they will not appear in latest."
|
||||
no_category_access: "As a moderator you have limited category access, save is disabled."
|
||||
delete_account: "Delete My Account"
|
||||
delete_account_confirm: "Are you sure you want to permanently delete your account? This action cannot be undone!"
|
||||
deleted_yourself: "Your account has been deleted successfully."
|
||||
|
|
Loading…
Reference in New Issue