Skip to content

MediaWiki extension to make certain file types not downloadable to some users

Notifications You must be signed in to change notification settings

enterprisemediawiki/UploadPermissions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload Permissions

Extension:UploadPermissions allows making certain file types not downloadable to some users. This only works on private wikis using img_auth.php.

See https://www.mediawiki.org/wiki/Extension:UploadPermissions for more information

Usage

After installing the extension, add configuration to LocalSettings.php like:

$wgUploadPermsRejectFilesForGroups = [
    'no_images_group' => ['jpg',  'png', 'tiff'],
    'no_documents_group' =>  ['docx', 'pdf', 'xlsx' ],
];

The above config would cause any user in the group no_images_group to be unable to view/download files with jpg, png, or tiff extensions. The no_documents_group cannot download docx, pdf, or xlsx files.

In order for this to work, these groups must already exist. You can configure new groups by adding the following to LocalSettings.php:

$wgGroupPermissions['my_new_group'] = [];

About

MediaWiki extension to make certain file types not downloadable to some users

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages