matomo-org / matomo-org/matomo-for-wordpress
In Access settings tab let users choose to make their data public
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 145
- Forks
- 35
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Haven't added it yet as it's rarely needed.
* Add a new global setting "allow_anonymous_access"
* In Access Settings template show form (see below) to enable this feature => after successful change of setting value we should trigger a user re-sync
* In AccessSettings class process that form post and configure the above global setting accordingly
* Capabilitiy class needs to add the `MATOMO_VIEW` capability to all users when feature is enabled
* User Sync needs to make sure to enable/disable anonymous access in Matomo by giving the anonymous user view access
Tests for all of this...
The form could look like this
```html
Public access: Give everyone view access to your reporting data - including not logged in users
Enabling this feature makes your reports available to everyone. Anyone will be able to view how many visitors you had, what pages have been viewed on your website how often, and more.
Learn more about making your report data public and viewable by anyone
Are you sure you want to change anonymous's role to View for your reports?
Giving the anonymous user the View role will make this website's data public and available to everyone, even if they do not have a Matomo login. Please type OK to confirm this change
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Access Settings template, AccessSettings, Capability, and User Sync implementations, then trace how global settings and user roles are currently handled. Add the anonymous-access setting and confirmation form, update capabilities and synchronization when it changes, and add tests covering the setting, form handling, capabilities, and anonymous user's view access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- authorization, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100