https://bugzilla.wikimedia.org/show_bug.cgi?id=42171
Web browser: ---
Bug #: 42171
Summary: How to default enable a gadget, but not for anons
Product: MediaWiki extensions
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Gadgets
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
How to do this? I don't see any user *rights* that would allow me to reliably
distinguish anons from logged-in users.
My current work-around is to default-enable the gadget, and then check in the
JavaScript for wgUserName: if it's null, the user is not logged in, and the
script does nothing.
But that's ugly because the script is loaded. If there were a "marker" user
right for each user *group*, I could use that. I notice that
DefaultSettings.php has
$wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
$wgGroupPermissions['bot']['bot'] = true;
Could we add to that
$wgGroupPermissions['user']['user'] = true;
so that a Gadget could be default-enabled for all logged-in users, but not for
anons, using
MyGadget[ResourceLoader|default|rights=user]|MyGadget.js
in MediaWiki:Gadgets-definition?
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l