Harej has uploaded a new change for review. ( 
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, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/12/339812/1

diff --git a/modules/ext.CollaborationKit.list.members.js 
b/modules/ext.CollaborationKit.list.members.js
index c873679..e4f353c 100644
--- a/modules/ext.CollaborationKit.list.members.js
+++ b/modules/ext.CollaborationKit.list.members.js
@@ -88,7 +88,7 @@
        };
 
        $( function () {
-               if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
) {
+               if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
&& mw.user.getId() != 0 ) {
                        memberListPage = mw.config.get( 
'wgCollaborationKitAssociatedMemberList' );
                        curUserIsInList( memberListPage ); // removes Join 
button if user already is member
                        new mw.Api().get( {
@@ -108,7 +108,7 @@
                }
 
                if ( mw.config.get( 'wgCollaborationKitIsMemberList' ) &&
-                       !curUserIsInList()
+                       !curUserIsInList() && mw.user.getId() != 0
                ) {
                        $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: newchange
Gerrit-Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej <jamesmh...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to