fix: création compte via LDAP/Note

wiki
Pyjacpp 2026-07-22 12:31:26 +02:00
parent 26cb033960
commit 1520bd6d4c
No known key found for this signature in database
GPG Key ID: ED479A5A26930939
2 changed files with 15 additions and 7 deletions

View File

@ -1,5 +1,5 @@
diff --git a/CategoryLockdown.php b/CategoryLockdown.php
index 3309c52..f2cef51 100644
index 3309c52..c4f4cb0 100644
--- a/CategoryLockdown.php
+++ b/CategoryLockdown.php
@@ -1,6 +1,7 @@
@ -50,7 +50,7 @@ index 3309c52..f2cef51 100644
if ( !$permissions ) {
continue;
}
@@ -56,15 +59,40 @@ class CategoryLockdown {
@@ -56,15 +59,44 @@ class CategoryLockdown {
$combinedGroups[] = $allowedGroup;
}
}
@ -80,7 +80,11 @@ index 3309c52..f2cef51 100644
+ continue; # Skip if this group rule doesnt match the user
+ }
+
+ $requiredCat = $groupCategories[$action] ?? [];
+ $requiredCat = $groupCategories[$action];
+ if ( $requiredCat == null ) {
+ continue;
+ }
+
+ $groupLocked = true;
+ foreach ( $requiredCat as $c ) {
+ if ( in_array( $c, $categories ) ) {

View File

@ -77,7 +77,7 @@ in
$wgMaxUploadSize = 512 * 1024 * 1024;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = '${pkgs.imagemagick}/bin/convert';
$wgStrictFileExtensions = false;
$wgStrictFileExtensions = false; # On autorise toutes les extensions sauf https://www.mediawiki.org/wiki/Manual:$wgProhibitedFileExtensions
$wgFileExtensions[] = 'pdf';
$wgFileExtensions[] = 'svg';
@ -145,7 +145,7 @@ in
# Access Control
$wgGroupPermissions['*']['edit'] = false; # Restrict edition for anonymous user
$wgGroupPermissions['*']['createaccount'] = false; # Restrict the creation of account to sysop only
$wgGroupPermissions['*']['autocreateaccount'] = true; # Création de comptes depuis LDAP et Note mais pas local
$wgCategoryLockdownWhitelist = [
"Spécial:Connexion",
"Spécial:Connexion/return",
@ -154,8 +154,9 @@ in
"MediaWiki:Common.css",
"MediaWiki:Common.js"
];
$wgCategoryGroupLockdown["!user"]["read"] = [ "Page Publique" ]; # Restrict read for non-user (i.e. anonymous) on execpt for Page Publique
$wgCategoryGroupLockdown["!user"]["read"] = [ "Page Publique" ]; # Restrict read for non-user (i.e. anonymous) on execpt for Page Publique # Extensions
# Extensions
$wgWikiEditorRealtimePreview = true;
$wgCiteBookReferencing = true;
$wgPdfProcessor = '${pkgs.ghostscript}/bin/gs';
@ -174,6 +175,9 @@ in
NS_ARCHIVE => "Archive",
NS_ARCHIVE_TALK => "Discussion_archive",
];
$wgNamespacesWithSubpages[NS_MAIN] = true;
$wgNamespacesWithSubpages[NS_ARCHIVE] = true;
$wgVisualEditorAvailableNamespaces[NS_ARCHIVE] = true;
# Debug
$wgShowExceptionDetails = true;