Revert "FIX: Disable request membership button if user does not have sufficient trust level."
This reverts commit 5f441a2614
.
This commit is contained in:
parent
baf635c06e
commit
c5caa9cf71
|
@ -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() {
|
_showLoginModal() {
|
||||||
this.sendAction('showLogin');
|
this.sendAction('showLogin');
|
||||||
$.cookie('destination_url', window.location.href);
|
$.cookie('destination_url', window.location.href);
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
{{d-button action="requestMembership"
|
{{d-button action="requestMembership"
|
||||||
class="group-index-request"
|
class="group-index-request"
|
||||||
icon="envelope"
|
icon="envelope"
|
||||||
label="groups.request"
|
label="groups.request"}}
|
||||||
title=requestMembershipButtonTitle
|
|
||||||
disabled=disableRequestMembership}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{yield}}
|
{{yield}}
|
||||||
|
|
|
@ -410,7 +410,6 @@ en:
|
||||||
request_membership_pm:
|
request_membership_pm:
|
||||||
title: "Membership Request"
|
title: "Membership Request"
|
||||||
body: "I would like to apply for membership in @%{groupName}."
|
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"
|
name_placeholder: "Group name, no spaces, same as username rule"
|
||||||
public: "Allow users to join/leave the group freely (Requires group to be visible)"
|
public: "Allow users to join/leave the group freely (Requires group to be visible)"
|
||||||
empty:
|
empty:
|
||||||
|
|
|
@ -824,7 +824,6 @@ trust:
|
||||||
min_trust_to_send_messages:
|
min_trust_to_send_messages:
|
||||||
default: 1
|
default: 1
|
||||||
enum: 'TrustLevelSetting'
|
enum: 'TrustLevelSetting'
|
||||||
client: true
|
|
||||||
tl1_requires_topics_entered: 5
|
tl1_requires_topics_entered: 5
|
||||||
tl1_requires_read_posts:
|
tl1_requires_read_posts:
|
||||||
default: 30
|
default: 30
|
||||||
|
|
Loading…
Reference in New Issue