jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



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: merged
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]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to