mediawiki / smw-file-protect
Protects files and namespaces in Semantic MediaWiki based on user rights and properties.
Package info
github.com/ProteoWiki/SMWFileProtect
Type:mediawiki-extension
pkg:composer/mediawiki/smw-file-protect
dev-master
2025-10-07 15:56 UTC
Requires
- php: >=7.2
- composer/installers: 1.*,>=1.0.1
Requires (Dev)
This package is auto-updated.
Last update: 2026-03-07 17:16:34 UTC
README
Extension to protect access to files based on which pages images are embedded and the SMW properties assigned to that page.
Please check http://www.mediawiki.org/wiki/Manual:Image_Authorization for proper setup first.
DISCLAIMER: Only Lockdown functions are currently working. SMW ones are disabled for now.
Parameters
$SMWFileProtectRights = array("sysop"); // Which roles are always allowed to view files no matter the linked pages
$SMWFileProtectReferUsers = array("Has User"); // Property that refers to pages that link to other pages, for instance user pages, assuming that a page is created or assigned to a user
$SMWFileProtectReferProps = array("Is Visible"); // Boolean property that can be used to grant permission to the page.
$SMWFileProtectReferNS = true; // This allows to block viewing based on Lockdown Extension https://www.mediawiki.org/wiki/Extension:Lockdown