Restrict who can create items and properties
In this short tutorial, we look at how you can restrict who can create new items (and properties) in your Wikibase.
Wikibase Defaults
Wikibase comes with configuration that makes sense for Wikidata.org, and similar use cases. Wikidata is an open wiki where everyone can create and edit items. The only restriction it supports is that you cannot create new properties unless your user account is in the “property creators” group. By default, everyone is in this group.
Restriction of editing
Many organizations do not want everyone, including people without an account, to edit their Wikibase. The same goes for standard MediaWiki without Wikibase. Many choose to require an account to edit and then restrict who can get an account.
Requiring an account to make changes in the wiki:
$wgGroupPermissions['*']['edit'] = false;
You can go further and require the user to be part of a special group to edit.
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['your-user-group']['edit'] = true;
For more information, see the user rights manual.
If you wish to restrict editing of just items or properties, you can use the
wgNamespaceProtection setting:
$wgNamespaceProtection[WB_NS_ITEM] = [ 'your-item-editors' ];
$wgNamespaceProtection[WB_NS_PROPERTY] = [ 'your-property-editors' ];
Restriction of creation
If you prevent users from editing, they cannot make any changes, including creating new pages like Wikibase items. What if you want to require users to be part of a group so they can create items or properties while letting other users still edit those items and properties?
In the case of properties, you can use the property-create
right provided by Wikibase:
$wgGroupPermissions['*']['property-create'] = false;
$wgGroupPermissions['your-property-creators']['property-create'] = false;
For items, things are a bit more tricky, since there is no item-create right. We can work around
this by using the Lockdown extension:
wfLoadExtension( 'Lockdown' );
$wgSpecialPageLockdown['NewItem'] = [ 'your-item-creators' ];
$wgNamespacePermissionLockdown[WB_NS_ITEM]['createpage'] = [ 'your-item-creators' ];
This allows you to restrict the creation of items and/or properties in your Wikibase to trusted users while allowing more people, perhaps everyone, to edit existing items and/or properties.
Wikibase Permission UI
2024 addition: you can now configure Wikibase permissions via the Wikibase dashboard available to Professional Wiki customers.
- Use Wikidata and Wikibase with AI
- Chameleon 6: Now on Bootstrap 5
- Semantic MediaWiki 7.2.0 Released
- Native Markdown for MediaWiki
- Use Semantic MediaWiki with AI
- Semantic MediaWiki 7 Released
- Introducing NeoWiki and More at MUDCon
- MediaWiki Chatbot Extensions Compared
- Wikibase Faceted Search Released
- Semantic MediaWiki 5 Released
- Top Wikibase Extensions
- 2024 MediaWiki Conference Highlights
- Semantic Wikibase: 2024 Update
- We Partner with HalloWelt to Provide BlueSpice
- Semantic MediaWiki 4.2.0 Released
- Is Wikibase Right for Your Project?
- Sorting Wikibase Statements by Property
- New Extension: Wikibase Export
- Semantic MediaWiki 4.1.0 released
- Embedding External Content in MediaWiki
- Fast Bulk Import Into Wikibase
- SMWCon 2021
- WikidataCon 2021
- Deleting all Wikibase Items and/or Properties
- Restrict who can create items and properties
- Best Responsive MediaWiki Skins
- Medik MediaWiki Skin
- Happy 20th Anniversary Wikipedia
- Transferring Wikibase data between wikis
- Semantic MediaWiki 3.2
- Local Media Support for Wikibase
- Chameleon MediaWiki Skin
- Foreground MediaWiki Skin
- Pivot MediaWiki Skin
- Tweeki MediaWiki Skin
- Semantic Wikibase Released
- Visualizing Links Between Pages
- MediaWiki Survey
- SMW vs Wikibase vs Cargo
- Using Wikidata in Your Wiki
- Visual Map Editor for MediaWiki
- WikidataCon 2019 Berlin
- Installing Extensions with Composer
- SMWCon 2019 Paris