FIX: If personal messages are disabled, don't show messages for groups
This commit is contained in:
parent
e262939590
commit
2f19588311
|
@ -6,6 +6,9 @@ export default Ember.Controller.extend({
|
|||
|
||||
@computed('model.is_group_user')
|
||||
showGroupMessages(isGroupUser) {
|
||||
if (!this.siteSettings.enable_personal_messages) {
|
||||
return false;
|
||||
}
|
||||
return isGroupUser || (this.currentUser && this.currentUser.admin);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -13,6 +13,8 @@ module GroupGuardian
|
|||
end
|
||||
|
||||
def can_see_group_messages?(group)
|
||||
is_admin? || group.users.include?(user)
|
||||
SiteSetting.enable_private_messages? && (
|
||||
is_admin? || group.users.include?(user)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue