Andrew Bogott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/270554
Change subject: Increase the chances of getting the project name when checking
hiera permission
......................................................................
Increase the chances of getting the project name when checking hiera permission
Previously the project name was always wrong due to the leading
capital letter of the article name. Probably this never
quite worked.
Using strtolower() should be safe because project names are vetted by
"/^[a-z][a-z0-9-]*$/" on creation.
Change-Id: Iea406f35aebc71f2dec2e0a5543f66ad3c3457e1
---
M OpenStackManagerHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager
refs/changes/54/270554/1
diff --git a/OpenStackManagerHooks.php b/OpenStackManagerHooks.php
index ecfc163..9a31ec1 100644
--- a/OpenStackManagerHooks.php
+++ b/OpenStackManagerHooks.php
@@ -23,7 +23,7 @@
if ( !$userLDAP->exists() ) {
$result = array(
'openstackmanager-nonovacred-admincreate' );
}
- $project = $title->getRootText();
+ $project = strtolower( $title->getRootText() );
if ( !$userLDAP->inRole( 'projectadmin', $project ) &&
!$user->isAllowed( 'editallhiera' ) ) {
$result = array(
'openstackmanager-hiera-noadmin', $project );
return false;
--
To view, visit https://gerrit.wikimedia.org/r/270554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea406f35aebc71f2dec2e0a5543f66ad3c3457e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: wmf/1.27.0-wmf.13
Gerrit-Owner: Andrew Bogott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits