Harej has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/339812 )
Change subject: Remove JS functionality for logged-out users for join button. ...................................................................... Remove JS functionality for logged-out users for join button. The project join button assumes the existence of a user account. Logged out users lack this, so this removes the "join" button from the member list itself. The button is still technically there on the hub page, but the JavaScript functionality is removed, so logged out users can still technically join projects (to the extent they're already allowed to join WikiProjects). Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f --- M modules/ext.CollaborationKit.list.members.js 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Isarra: Looks good to me, approved diff --git a/modules/ext.CollaborationKit.list.members.js b/modules/ext.CollaborationKit.list.members.js index c873679..bb72d2c 100644 --- a/modules/ext.CollaborationKit.list.members.js +++ b/modules/ext.CollaborationKit.list.members.js @@ -88,7 +88,10 @@ }; $( function () { - if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) ) { + // Workflow assumes existence of username, so we filter against it + // However, since !curUserIsInList, the button will still render. It will just use no-JS + // behavior instead. + if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) && !mw.user.isAnon() ) { memberListPage = mw.config.get( 'wgCollaborationKitAssociatedMemberList' ); curUserIsInList( memberListPage ); // removes Join button if user already is member new mw.Api().get( { @@ -108,7 +111,7 @@ } if ( mw.config.get( 'wgCollaborationKitIsMemberList' ) && - !curUserIsInList() + !curUserIsInList() && !mw.user.isAnon() // Workflow assumes existence of username ) { $list = $( '.mw-ck-list' ); $list.before( -- To view, visit https://gerrit.wikimedia.org/r/339812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: Isarra <zhoris...@gmail.com> Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits