From c5caa9cf71c32b71c3f38b15b86c2a10a43306ae Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 13 Jun 2017 14:56:25 +0900 Subject: [PATCH] Revert "FIX: Disable request membership button if user does not have sufficient trust level." This reverts commit 5f441a2614b4948e79388af578a9260cfed1e86c. --- .../components/group-membership-button.js.es6 | 16 ---------------- .../components/group-membership-button.hbs | 4 +--- config/locales/client.en.yml | 1 - config/site_settings.yml | 1 - 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 index 5c7449532d9..b5911799093 100644 --- a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 +++ b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 @@ -17,22 +17,6 @@ export default Ember.Component.extend({ } }, - @computed - disableRequestMembership() { - if (this.currentUser) { - return this.currentUser.trust_level < this.siteSettings.min_trust_to_send_messages; - } else { - return false; - } - }, - - @computed("disableRequestMembership") - requestMembershipButtonTitle(disableRequestMembership) { - if (disableRequestMembership) { - return "groups.request_membership_pm.disabled"; - } - }, - _showLoginModal() { this.sendAction('showLogin'); $.cookie('destination_url', window.location.href); diff --git a/app/assets/javascripts/discourse/templates/components/group-membership-button.hbs b/app/assets/javascripts/discourse/templates/components/group-membership-button.hbs index 0bb4ff804cc..fb1444bbf37 100644 --- a/app/assets/javascripts/discourse/templates/components/group-membership-button.hbs +++ b/app/assets/javascripts/discourse/templates/components/group-membership-button.hbs @@ -25,9 +25,7 @@ {{d-button action="requestMembership" class="group-index-request" icon="envelope" - label="groups.request" - title=requestMembershipButtonTitle - disabled=disableRequestMembership}} + label="groups.request"}} {{/if}} {{else}} {{yield}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 1264bbbba78..fbb442879ea 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -410,7 +410,6 @@ en: request_membership_pm: title: "Membership Request" body: "I would like to apply for membership in @%{groupName}." - disabled: "Insufficient trust level to request for group membership" name_placeholder: "Group name, no spaces, same as username rule" public: "Allow users to join/leave the group freely (Requires group to be visible)" empty: diff --git a/config/site_settings.yml b/config/site_settings.yml index 869b47ba8e9..5c71d831759 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -824,7 +824,6 @@ trust: min_trust_to_send_messages: default: 1 enum: 'TrustLevelSetting' - client: true tl1_requires_topics_entered: 5 tl1_requires_read_posts: default: 30