mirror of https://gitlab.crans.org/nounous/nixos
Sync LDAP et fix ACLs
parent
924f92ad00
commit
73094965b1
|
|
@ -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 doesn’t match the user
|
||||
+ }
|
||||
+
|
||||
+ $requiredCat = $groupCategories[$action];
|
||||
+ $requiredCat = $groupCategories[ $action ] ?? null;
|
||||
+ if ( $requiredCat == null ) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
|
|
|||
|
|
@ -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.
Loading…
Reference in New Issue