Sync LDAP et fix ACLs

wiki
Pyjacpp 2026-07-27 09:53:03 +02:00
parent 924f92ad00
commit 73094965b1
No known key found for this signature in database
GPG Key ID: ED479A5A26930939
3 changed files with 16 additions and 6 deletions

View File

@ -1,8 +1,8 @@
diff --git a/CategoryLockdown.php b/CategoryLockdown.php
index 3309c52..c4f4cb0 100644
index 1e17ec7..8108615 100644
--- a/CategoryLockdown.php
+++ b/CategoryLockdown.php
@@ -15,6 +16,8 @@ class CategoryLockdown {
@@ -16,6 +16,8 @@ class CategoryLockdown {
*/
public static function onGetUserPermissionsErrors( $title, $user, $action, &$result ) {
global $wgCategoryLockdown;
@ -11,7 +11,7 @@ index 3309c52..c4f4cb0 100644
$explicitGroups = MediaWikiServices::getInstance()->getUserGroupManager()->getUserGroups( $user );
$implicitGroups = MediaWikiServices::getInstance()->getUserGroupManager()->getUserImplicitGroups( $user );
@@ -25,6 +28,11 @@ class CategoryLockdown {
@@ -26,6 +28,11 @@ class CategoryLockdown {
return;
}
@ -23,7 +23,7 @@ index 3309c52..c4f4cb0 100644
$categories = array_keys( $title->getParentCategories() );
// Apply rules to the category page itself
@@ -32,16 +40,11 @@ class CategoryLockdown {
@@ -33,16 +40,11 @@ class CategoryLockdown {
$categories[] = $title->getFullText();
}
@ -42,7 +42,7 @@ index 3309c52..c4f4cb0 100644
if ( !$permissions ) {
continue;
}
@@ -56,15 +59,44 @@ class CategoryLockdown {
@@ -57,15 +59,44 @@ class CategoryLockdown {
$combinedGroups[] = $allowedGroup;
}
}
@ -72,7 +72,7 @@ index 3309c52..c4f4cb0 100644
+ continue; # Skip if this group rule doesnt match the user
+ }
+
+ $requiredCat = $groupCategories[$action];
+ $requiredCat = $groupCategories[ $action ] ?? null;
+ if ( $requiredCat == null ) {
+ continue;
+ }

View File

@ -146,6 +146,7 @@ in
$wgGroupPermissions['*']['delete'] = true; # Création de comptes depuis LDAP et Note mais pas local
$wgCategoryLockdownWhitelist = [
"Spécial:Connexion",
"Spécial:Déconnexion",
"Spécial:Connexion/return",
"Spécial:PluggableAuthLogin",
"Spécial:Recherche",
@ -286,6 +287,15 @@ in
# Pas de meilleure solution à ma connaissance pour suivre les releases.
sha256 = "sha256-/9VISvpvhaVq/sAHE10INlTju7+PTirFO/6U68WBOgM=";
};
LDAPGroup = pkgs.fetchFromGitHub {
name = "LDAPGroup";
owner = "wikimedia";
repo = "mediawiki-extensions-LDAPGroups";
tag = "3.1.0";
# Le SHA doit être changé à chaque nouveau commit de traduction.
# Pas de meilleure solution à ma connaissance pour suivre les releases.
sha256 = "sha256-aW1nVechxy4CfyT953LfNgeUOXZGeIkV3KwPJJwlyug=";
};
WSOAuth = pkgs.applyPatches {
src = pkgs.fetchFromGitHub {
name = "WSOAuth";

Binary file not shown.