diff --git a/core/Access.php b/core/Access.php index a7b4d7178e3e8cf2f55c7821efd50d7a16d8158b..55335385d04d798d783da4b3cf056aa951df94a8 100644 --- a/core/Access.php +++ b/core/Access.php @@ -245,15 +245,6 @@ class Access } } - /** - * @see Access::setSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - public function setSuperUser($bool = true) - { - self::setSuperUserAccess($bool); - } - /** * Returns true if the current user is logged in as the Super User * @@ -264,15 +255,6 @@ class Access return $this->hasSuperUserAccess; } - /** - * @see Access::hasSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - public function isSuperUser() - { - return $this->hasSuperUserAccess(); - } - /** * Returns the current user login * @@ -314,14 +296,6 @@ class Access return $firstSuperUser['login']; } - /** - * @deprecated deprecated since version 2.0.4 - */ - public function getSuperUserLogin() - { - return $this->getAnySuperUserAccessLogin(); - } - /** * Returns an array of ID sites for which the user has at least a VIEW access. * Which means VIEW or ADMIN or SUPERUSER. @@ -377,15 +351,6 @@ class Access } } - /** - * @see Access::checkUserHasSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - public function checkUserIsSuperUser() - { - self::checkUserHasSuperUserAccess(); - } - /** * If the user doesn't have an ADMIN access for at least one website, throws an exception * diff --git a/core/Piwik.php b/core/Piwik.php index a0cff3cdc2df8103fe3f9daecf66190f4b392159..6c4707073469f1272c2b2d5a226bfa3dcee78595 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -257,22 +257,6 @@ class Piwik return $user['email']; } - /** - * @deprecated deprecated since version 2.0.4 - */ - static public function getSuperUserLogin() - { - return Access::getInstance()->getSuperUserLogin(); - } - - /** - * @deprecated deprecated since version 2.0.4 - */ - static public function getSuperUserEmail() - { - return ''; - } - /** * Get a list of all email addresses having Super User access. * @@ -335,24 +319,6 @@ class Piwik } } - /** - * @see Piwik::hasUserSuperUserAccessOrIsTheUser() - * @deprecated deprecated since version 2.0.4 - */ - static public function isUserIsSuperUserOrTheUser($theUser) - { - return self::hasUserSuperUserAccessOrIsTheUser($theUser); - } - - /** - * @see Piwik::checkUserHasSuperUserAccessOrIsTheUser() - * @deprecated deprecated since version 2.0.4 - */ - static public function checkUserIsSuperUserOrTheUser($theUser) - { - self::checkUserHasSuperUserAccessOrIsTheUser($theUser); - } - /** * Check that the current user is either the specified user or the superuser. * @@ -404,14 +370,6 @@ class Piwik return false; } - /** - * @see Piwik::hasUserSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - static public function isUserIsSuperUser() - { - return self::hasUserSuperUserAccess(); - } /** * Returns true if the current user has Super User access. @@ -464,24 +422,6 @@ class Piwik Access::getInstance()->setSuperUserAccess($bool); } - /** - * @see Piwik::setUserHasSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - static public function setUserIsSuperUser($bool = true) - { - self::setUserHasSuperUserAccess($bool); - } - - /** - * @see Piwik::checkUserHasSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - static public function checkUserIsSuperUser() - { - self::checkUserHasSuperUserAccess(); - } - /** * Check that the current user has superuser access. * diff --git a/tests/PHPUnit/Core/DeprecatedMethodsTest.php b/tests/PHPUnit/Core/DeprecatedMethodsTest.php index bdcf46db8d9e086e23a0a8ce79d3be809ff60e9e..786b968d0e9d526e90cf1a3d460224f57d928b9b 100644 --- a/tests/PHPUnit/Core/DeprecatedMethodsTest.php +++ b/tests/PHPUnit/Core/DeprecatedMethodsTest.php @@ -22,7 +22,6 @@ class DeprecatedMethodsTest extends PHPUnit_Framework_TestCase public function test_version2_0_4() { $validTill = '2014-04-01'; - $this->assertDeprecatedMethodIsRemoved('\Piwik\Piwik', 'isUserIsSuperUserOrTheUser', $validTill); $this->assertDeprecatedMethodIsRemoved('\Piwik\Piwik', 'checkUserIsSuperUserOrTheUser', $validTill); $this->assertDeprecatedMethodIsRemoved('\Piwik\Piwik', 'isUserIsSuperUser', $validTill); @@ -37,6 +36,8 @@ class DeprecatedMethodsTest extends PHPUnit_Framework_TestCase $this->assertDeprecatedMethodIsRemoved('\FakeAccess', 'checkUserIsSuperUser', $validTill); $this->assertDeprecatedMethodIsRemoved('\FakeAccess', 'setSuperUser', $validTill); $this->assertDeprecatedMethodIsRemoved('\FakeAccess', 'getSuperUserLogin', $validTill); + + $validTill = '2014-10-01'; $this->assertDeprecatedMethodIsRemoved('\Piwik\Config', 'getConfigSuperUserForBackwardCompatibility', $validTill); } diff --git a/tests/PHPUnit/FakeAccess.php b/tests/PHPUnit/FakeAccess.php index 0b550d17447f6470222039f079cbfe1d10ad0f6e..9711dbffbabfa8364bab1ad986b5921cbc532b12 100644 --- a/tests/PHPUnit/FakeAccess.php +++ b/tests/PHPUnit/FakeAccess.php @@ -56,29 +56,11 @@ class FakeAccess } } - /** - * @see FakeAccess::checkUserHasSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - public function checkUserIsSuperUser() - { - self::checkUserHasSuperUserAccess(); - } - public static function setSuperUserAccess($bool = true) { self::$superUser = $bool; } - /** - * @see FakeAccess::setSuperUserAccess() - * @deprecated deprecated since version 2.0.4 - */ - public static function setSuperUser($bool = true) - { - self::setSuperUserAccess($bool); - } - public static function reloadAccess() { } @@ -188,11 +170,4 @@ class FakeAccess return $result; } - /** - * @deprecated deprecated since version 2.0.4 - */ - public function getSuperUserLogin() - { - return self::$superUserLogin; - } }