diff --git a/core/Access.php b/core/Access.php index aafe8b38660b15508f043286f35cb7f0f68aa1e4..a2e90466ce6e221981f8bf9f7c48105ec02be9c0 100644 --- a/core/Access.php +++ b/core/Access.php @@ -24,7 +24,7 @@ use Piwik\Plugins\UsersManager\API as APIUsersManager; * - **no access**: Users with this access level cannot view the resource. * - **view access**: Users with this access level can view the resource, but cannot modify it. * - **admin access**: Users with this access level can view and modify the resource. - * - **super user access**: Only the super user has this access level. It means the user can do + * - **Super User access**: Only the Super User has this access level. It means the user can do * whatever he/she wants. * * Super user access is required to set some configuration options. @@ -84,7 +84,7 @@ class Access protected $token_auth = null; /** - * Defines if the current user is the super user + * Defines if the current user is the Super User * @see hasSuperUserAccess() * * @var bool @@ -199,7 +199,7 @@ class Access } /** - * Reload super user access + * Reload Super User access * * @return bool */ @@ -247,7 +247,7 @@ class Access } /** - * Returns true if the current user is logged in as the super user + * Returns true if the current user is logged in as the Super User * * @return bool */ diff --git a/core/Piwik.php b/core/Piwik.php index b29f262adf43b876d6f94188dbb0b83e7cb76a66..aea9e58a6bfb4ba20743db55e431cfb0e8f82aad 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -272,7 +272,7 @@ class Piwik } /** - * Returns `true` if the current user is either the super user or the user specified by + * Returns `true` if the current user is either the Super User or the user specified by * `$theUser`. * * @param string $theUser A username. @@ -311,14 +311,14 @@ class Piwik * Check that the current user is either the specified user or the superuser. * * @param string $theUser A username. - * @throws NoAccessException If the user is neither the super user nor the user `$theUser`. + * @throws NoAccessException If the user is neither the Super User nor the user `$theUser`. * @api */ static public function checkUserHasSuperUserAccessOrIsTheUser($theUser) { try { if (Piwik::getCurrentUserLogin() !== $theUser) { - // or to the super user + // or to the Super User Piwik::checkUserHasSuperUserAccess(); } } catch (NoAccessException $e) { @@ -364,7 +364,7 @@ class Piwik } /** - * Returns true if the current user has super user access. + * Returns true if the current user has Super User access. * * @return bool * @api @@ -407,7 +407,7 @@ class Piwik * Helper method user to set the current as superuser. * This should be used with great care as this gives the user all permissions. * - * @param bool $bool true to set current user as super user + * @param bool $bool true to set current user as Super User */ static public function setUserHasSuperUserAccess($bool = true) { diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php index 0415418812bcbe579eaf925624e441998c264f08..e2fd14d25f66d40e0d553df665714dbe028877e1 100644 --- a/core/Plugin/Controller.php +++ b/core/Plugin/Controller.php @@ -528,7 +528,7 @@ abstract class Controller * * **debugTrackVisitsInsidePiwikUI** - The value of the `[Debug] track_visits_inside_piwik_ui` * INI config option. - * **isSuperUser** - True if the current user is the super user, false if otherwise. + * **isSuperUser** - True if the current user is the Super User, false if otherwise. * **hasSomeAdminAccess** - True if the current user has admin access to at least one site, * false if otherwise. * **isCustomLogo** - The value of the `[branding] use_custom_logo` INI config option. @@ -572,7 +572,7 @@ abstract class Controller * - **isValidHost** - true if host is valid, false if otherwise * - **invalidHostMessage** - message to display if host is invalid (only set if host is invalid) * - **invalidHost** - the invalid hostname (only set if host is invalid) - * - **mailLinkStart** - the open tag of a link to email the super user of this problem (only set + * - **mailLinkStart** - the open tag of a link to email the Super User of this problem (only set * if host is invalid) * * @param View $view diff --git a/core/Settings/SystemSetting.php b/core/Settings/SystemSetting.php index 3084ba36075b6cf43c67933d042a972890e2ec6b..3f7bb2a18163e166bd538f6f0fbdf98f4e19a18b 100644 --- a/core/Settings/SystemSetting.php +++ b/core/Settings/SystemSetting.php @@ -14,7 +14,7 @@ namespace Piwik\Settings; use Piwik\Piwik; /** - * Describes a system wide setting. Only the super user can change this type of setting and + * Describes a system wide setting. Only the Super User can change this type of setting and * the value of this setting will affect all users. * * See {@link \Piwik\Plugin\Settings}. diff --git a/core/Tracker.php b/core/Tracker.php index 45a7369f7be9f649e72cbae0ed6be7a450f20b57..88d6c933182879adf6f5a026287d61177c20a1c7 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -319,7 +319,7 @@ class Tracker Option::set('lastTrackerCronRun', $cache['lastTrackerCronRun']); Common::printDebug('-> Scheduled Tasks: Starting...'); - // save current user privilege and temporarily assume super user privilege + // save current user privilege and temporarily assume Super User privilege $isSuperUser = Piwik::hasUserSuperUserAccess(); // Scheduled tasks assume Super User is running diff --git a/core/Tracker/Cache.php b/core/Tracker/Cache.php index b9b1e11dc03b8bbf5c43bca29f2a006e88264f3a..a39985416efc02e2e6c4bc8bcf4a6c246e42e28e 100644 --- a/core/Tracker/Cache.php +++ b/core/Tracker/Cache.php @@ -63,7 +63,7 @@ class Cache Tracker::initCorePiwikInTrackerMode(); - // save current user privilege and temporarily assume super user privilege + // save current user privilege and temporarily assume Super User privilege $isSuperUser = Piwik::hasUserSuperUserAccess(); Piwik::setUserHasSuperUserAccess(); diff --git a/core/Updates/2.0.4-b5.php b/core/Updates/2.0.4-b5.php index d5a8c328f927de4872b6c25f9a6c75c6aee22203..50c399e8d079d97b84f62edc27ad4cb1601b84da 100644 --- a/core/Updates/2.0.4-b5.php +++ b/core/Updates/2.0.4-b5.php @@ -49,7 +49,7 @@ class Updates_2_0_4_b5 extends Updates return; } - // team_MobileMessagingSettings -> _MobileMessagingSettings as it is no longer guaranteed the super user's + // team_MobileMessagingSettings -> _MobileMessagingSettings as it is no longer guaranteed the Super User's // username is always the same $optionName = MobileMessaging::USER_SETTINGS_POSTFIX_OPTION; diff --git a/core/Url.php b/core/Url.php index 14470171ec680b069bf0c3290e8a16ccbe6d3b43..9a43a8410272b15e770f9bfdfa8b62008f86f9f8 100644 --- a/core/Url.php +++ b/core/Url.php @@ -251,7 +251,7 @@ class Url /** * Records one host, or an array of hosts in the config file, - * if user is super user + * if user is Super User * * @static * @param $host string|array diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index 047c805e57c3155211f2447c9230652c771f486c..1ac840b52a508749bb57eee0dd581f4c10171365 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -506,7 +506,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin * system check, so people can see if there are any issues w/ their running * Piwik installation. * - * This admin tab is only viewable by the super user. + * This admin tab is only viewable by the Super User. */ public function systemCheckPage() { diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php index 9ac6a295096e79827e116a1669c674c026e25aee..7cabd16af7244dec042f359b269da9c0c66b5a62 100644 --- a/plugins/Installation/Installation.php +++ b/plugins/Installation/Installation.php @@ -76,7 +76,7 @@ class Installation extends \Piwik\Plugin } /** - * Adds the 'System Check' admin page if the user is the super user. + * Adds the 'System Check' admin page if the user is the Super User. */ public function addMenu() { diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php index ed49b6cc5e7415d7d0341bf921d8207306c18517..32550d5fa8d2d69f7ce5e68039dd72822156dc91 100644 --- a/plugins/Live/Visitor.php +++ b/plugins/Live/Visitor.php @@ -605,7 +605,7 @@ class Visitor /** * Removes fields that are not meant to be displayed (md5 config hash) - * Or that the user should only access if he is super user or admin (cookie, IP) + * Or that the user should only access if he is Super User or admin (cookie, IP) * * @param array $visitorDetails * @return array diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php index a55fb1408dc24bf5c7b2755ce0c416cff46cf5db..75884bdd6df148335d88a0160aa0a7377e0a00f1 100644 --- a/plugins/SitesManager/API.php +++ b/plugins/SitesManager/API.php @@ -212,7 +212,7 @@ class API extends \Piwik\Plugin\API /** * Returns the list of all the website IDs registered. - * Requires super user access. + * Requires Super User access. * * @return array The list of website IDs */ @@ -229,7 +229,7 @@ class API extends \Piwik\Plugin\API /** * Returns the list of the website IDs that received some visits since the specified timestamp. - * Requires super user access. + * Requires Super User access. * * @param bool|int $timestamp * @return array The list of website IDs @@ -336,7 +336,7 @@ class API extends \Piwik\Plugin\API } if (!empty($_restrictSitesToLogin) - // Only super user or logged in user can see viewable sites for a specific login, + // Only Super User or logged in user can see viewable sites for a specific login, // but during scheduled task execution, we sometimes want to restrict sites to // a different login than the superuser. && (Piwik::hasUserSuperUserAccessOrIsTheUser($_restrictSitesToLogin) diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php index 9cb3280d841c454769bf0b6999c0a5e6a1000ee8..ee38b2f5e12eeb283163ab0a38d14ffa3fef9b30 100644 --- a/plugins/UsersManager/API.php +++ b/plugins/UsersManager/API.php @@ -349,11 +349,11 @@ class API extends \Piwik\Plugin\API } /** - * Enable or disable Super user access to the given user login. Note: When granting super user access all previous + * Enable or disable Super user access to the given user login. Note: When granting Super User access all previous * permissions of the user will be removed as the user gains access to everything. * * @param string $userLogin the user login. - * @param bool|int $hasSuperUserAccess true or '1' to grant super user access, false or '0' to remove super user + * @param bool|int $hasSuperUserAccess true or '1' to grant Super User access, false or '0' to remove Super User * access. * @throws \Exception */ @@ -375,7 +375,7 @@ class API extends \Piwik\Plugin\API } /** - * Returns a list of all super users containing there userLogin and email address. + * Returns a list of all Super Users containing there userLogin and email address. * * @return array */ @@ -486,7 +486,7 @@ class API extends \Piwik\Plugin\API } /** - * Returns true if user with given email (userEmail) is known in the database, or the super user + * Returns true if user with given email (userEmail) is known in the database, or the Super User * * @param string $userEmail * @return bool true if the user is known diff --git a/tests/PHPUnit/BaseFixture.php b/tests/PHPUnit/BaseFixture.php index 2a48ec784b1ac350d25e188d6e1ead90d0b52c82..285f1c5d4b0e79430aca422a6f5fe4d730f40304 100644 --- a/tests/PHPUnit/BaseFixture.php +++ b/tests/PHPUnit/BaseFixture.php @@ -209,7 +209,7 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert } /** - * Returns the super user token auth that can be used in tests. Can be used to + * Returns the Super User token auth that can be used in tests. Can be used to * do bulk tracking. * * @return string diff --git a/tests/PHPUnit/FakeAccess.php b/tests/PHPUnit/FakeAccess.php index 310e86e0f7d3fc3afe594e96ce31a577d5e60e2e..c37459dc07a4b776a3df522b8568da5d79502cb6 100644 --- a/tests/PHPUnit/FakeAccess.php +++ b/tests/PHPUnit/FakeAccess.php @@ -141,7 +141,7 @@ class FakeAccess throw new Exception("checkUserHasSomeAdminAccess Fake exception // string not to be tested"); } } else { - return; //super user has some admin rights + return; //Super User has some admin rights } } diff --git a/tests/PHPUnit/Integration/Plugins/LoginTest.php b/tests/PHPUnit/Integration/Plugins/LoginTest.php index 135965951c3f79711c921169e53b697589fcf051..4feeb33b6d445d8e8cba88c91b00bda7377d4abb 100644 --- a/tests/PHPUnit/Integration/Plugins/LoginTest.php +++ b/tests/PHPUnit/Integration/Plugins/LoginTest.php @@ -36,7 +36,7 @@ class Plugins_LoginTest extends DatabaseTestCase FakeAccess::setIdSitesView(array(1, 2)); FakeAccess::setIdSitesAdmin(array(3, 4)); - //finally we set the user as a super user by default + //finally we set the user as a Super User by default FakeAccess::$superUser = true; Access::setSingletonInstance($pseudoMockAccess); diff --git a/tests/PHPUnit/Integration/Plugins/MobileMessagingTest.php b/tests/PHPUnit/Integration/Plugins/MobileMessagingTest.php index e517589058c78ac85473dca70349ff796d2df05b..de288bba351b726d2964f85524090494e851568d 100644 --- a/tests/PHPUnit/Integration/Plugins/MobileMessagingTest.php +++ b/tests/PHPUnit/Integration/Plugins/MobileMessagingTest.php @@ -29,7 +29,7 @@ class Plugins_MobileMessagingTest extends DatabaseTestCase // setup the access layer $pseudoMockAccess = new FakeAccess; FakeAccess::$superUser = true; - //finally we set the user as a super user by default + //finally we set the user as a Super User by default Access::setSingletonInstance($pseudoMockAccess); $this->idSiteAccess = APISitesManager::getInstance()->addSite("test", "http://test"); diff --git a/tests/PHPUnit/Integration/Plugins/SegmentEditorTest.php b/tests/PHPUnit/Integration/Plugins/SegmentEditorTest.php index 4ddf276542cf5ee460d050d5136c49b227b0c993..19fe8fa0a557a6608b751f2c49dd5e4bc4eb9e15 100644 --- a/tests/PHPUnit/Integration/Plugins/SegmentEditorTest.php +++ b/tests/PHPUnit/Integration/Plugins/SegmentEditorTest.php @@ -30,7 +30,7 @@ class Plugins_SegmentEditorTest extends DatabaseTestCase FakeAccess::setIdSitesView(array(1, 2)); FakeAccess::setIdSitesAdmin(array(3, 4)); - //finally we set the user as a super user by default + //finally we set the user as a Super User by default FakeAccess::$superUser = true; FakeAccess::$superUserLogin = 'superusertest'; Access::setSingletonInstance($pseudoMockAccess); diff --git a/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php b/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php index 7f8f20059a87917f1c6663ea9d152d15c01c444f..3e88e155a672fc261b387a9603e2474dbffc4ca8 100644 --- a/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php +++ b/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php @@ -36,7 +36,7 @@ class Plugins_UsersManagerTest extends DatabaseTestCase FakeAccess::setIdSitesView(array(1, 2)); FakeAccess::setIdSitesAdmin(array(3, 4)); - //finally we set the user as a super user by default + //finally we set the user as a Super User by default FakeAccess::$superUser = true; FakeAccess::$superUserLogin = 'superusertest'; Access::setSingletonInstance($pseudoMockAccess); @@ -682,7 +682,7 @@ class Plugins_UsersManagerTest extends DatabaseTestCase $this->api->setUserAccess('login1', 'view', array($id1)); $this->api->setUserAccess('login1', 'admin', array($id2)); - // verify user has access before setting super user access + // verify user has access before setting Super User access $access = $this->_flatten($this->api->getSitesAccessFromUser('login1')); $this->assertEquals(array($id1 => 'view', $id2 => 'admin'), $access); @@ -700,7 +700,7 @@ class Plugins_UsersManagerTest extends DatabaseTestCase $this->api->setSuperUserAccess('login2', true); - // test add super user access + // test add Super User access $users = $this->api->getUsers(); $this->assertEquals(0, $users[0]['superuser_access']); @@ -708,9 +708,9 @@ class Plugins_UsersManagerTest extends DatabaseTestCase $this->assertEquals('login2', $users[1]['login']); $this->assertEquals(0, $users[2]['superuser_access']); - // should also accept string '1' to add super user access + // should also accept string '1' to add Super User access $this->api->setSuperUserAccess('login1', '1'); - // test remove super user access + // test remove Super User access $this->api->setSuperUserAccess('login2', false); $users = $this->api->getUsers(); @@ -720,7 +720,7 @@ class Plugins_UsersManagerTest extends DatabaseTestCase $this->assertEquals(0, $users[2]['superuser_access']); $this->api->setSuperUserAccess('login3', true); - // should also accept string '0' to remove super user access + // should also accept string '0' to remove Super User access $this->api->setSuperUserAccess('login1', '0'); $users = $this->api->getUsers(); diff --git a/tests/PHPUnit/Plugins/SEOTest.php b/tests/PHPUnit/Plugins/SEOTest.php index 3217a8f598e71fb3413405841dc24b5f0b1083da..9272cc3ed0b7b454ed1f9a4ed533dbe226fe4d9d 100644 --- a/tests/PHPUnit/Plugins/SEOTest.php +++ b/tests/PHPUnit/Plugins/SEOTest.php @@ -20,7 +20,7 @@ class SEOTest extends PHPUnit_Framework_TestCase FakeAccess::setIdSitesView(array(1, 2)); FakeAccess::setIdSitesAdmin(array(3, 4)); - //finally we set the user as a super user by default + //finally we set the user as a Super User by default FakeAccess::$superUser = true; Access::setSingletonInstance($pseudoMockAccess);