|
From: <gem...@li...> - 2011-11-22 15:08:45
|
Revision: 268
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=268&view=rev
Author: michieltcs
Date: 2011-11-22 15:08:39 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
Refs #307 - Add support for admin.ipRanges setting
Modified Paths:
--------------
trunk/library/classes/Gems/Project/ProjectSettings.php
trunk/library/classes/Gems/User/ProjectUserDefinition.php
Modified: trunk/library/classes/Gems/Project/ProjectSettings.php
===================================================================
--- trunk/library/classes/Gems/Project/ProjectSettings.php 2011-11-22 14:43:01 UTC (rev 267)
+++ trunk/library/classes/Gems/Project/ProjectSettings.php 2011-11-22 15:08:39 UTC (rev 268)
@@ -286,6 +286,18 @@
}
/**
+ * Returns the super admin password, if it exists
+ *
+ * @return string
+ */
+ public function getSuperAdminIPRanges()
+ {
+ if (isset($this->admin['ipRanges'])) {
+ return $this->admin['ipRanges'];
+ }
+ }
+
+ /**
* Returns a salted hash on the
*
* @param string $value The value to hash
Modified: trunk/library/classes/Gems/User/ProjectUserDefinition.php
===================================================================
--- trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-11-22 14:43:01 UTC (rev 267)
+++ trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-11-22 15:08:39 UTC (rev 268)
@@ -76,7 +76,7 @@
'user_style' => 'gems',
'user_organization_id' => $organization,
'user_organization_name' => 'SUPER ADMIN',
- 'user_allowed_ip_ranges' => '',
+ 'user_allowed_ip_ranges' => $this->project->getSuperAdminIPRanges(),
'allowedOrgs' => array($organization => 'SUPER ADMIN')
);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|