Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/124308

Change subject: Fix issue of blocked user seeing page protection instead of 
block message
......................................................................

Fix issue of blocked user seeing page protection instead of block message

A blocked user normally can't edit, so would hit the wbUserCanEdit
check in the js code and then see a page protection message, instead
of a message saying they are blocked.

Bug: 63607
Change-Id: I717f752e10dcab24d70c498734134d34b009d753
---
M repo/resources/wikibase.ui.entityViewInit.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/08/124308/1

diff --git a/repo/resources/wikibase.ui.entityViewInit.js 
b/repo/resources/wikibase.ui.entityViewInit.js
index 143633e..abc87fb 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -149,10 +149,10 @@
                        } );
                } );
 
-               if ( !mw.config.get( 'wbUserCanEdit' ) ) {
-                       $( wb ).triggerHandler( 'restrictEntityPageActions' );
-               } else if ( mw.config.get( 'wbUserIsBlocked' ) ) {
+               if ( mw.config.get( 'wbUserIsBlocked' ) ) {
                        $( wb ).triggerHandler( 'blockEntityPageActions' );
+               } else if ( !mw.config.get( 'wbUserCanEdit' ) ) {
+                       $( wb ).triggerHandler( 'restrictEntityPageActions' );
                }
 
                if( !mw.config.get( 'wbIsEditView' ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/124308
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I717f752e10dcab24d70c498734134d34b009d753
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to