Resolves issue #271263: Allow gitlab site administrators the option to disable cookies from Piwik
What does this MR do?
Resolves issue #271263 (closed): Allow gitlab site administrators the option to disable cookies from Piwik
The primary commit may be applies to any tagged version starting with v12.2.0-ee. The cherry-pick produces correct code including with versions v12.2.0-ee, v12.7.6 (server tested), v13.5.0-ee, v13.0.0-ee.
Screenshots (strongly suggested)
N/A. Alters behavior of the Piwik integration such that Piwik does not set Cookies in the end-user's web-browser.
Does this MR meet the acceptance criteria?
Conformity
-
Nothing to document (self-documenting configuration template changes)
-
Code reviewed by non-gitlab rails developer
-
Code tested in production
-
[-] Documentation (if required)
-
Merge request performance guidelines - No expected peformance impact, neither on the server nor in the context of the client's browser.
- The change to the haml file adds a compile-time switch, adding one line of javascript code ontaining a static boolean. When the configuration option is enabled, the javascript code pushes an additional flag to the json payload to the Piwik service.
-
- The existing code is bizarre to me; the use of
_paq.push
insidefunction()
makes no sense. I follow the existing convention. - A one-line
if()
expression is used, as it is sufficiently clear.
- The existing code is bizarre to me; the use of
Availability and Testing
- [-] Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
-
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team