Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs/faqs after 2.1 release #4583

Closed
mattab opened this issue Jan 29, 2014 · 4 comments
Closed

Update docs/faqs after 2.1 release #4583

mattab opened this issue Jan 29, 2014 · 4 comments
Labels
c: Website matomo.org For issues related to our matomo.org website. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jan 29, 2014

@mattab
Copy link
Member Author

mattab commented Jan 30, 2014

Subset of Blog post for new release:

Breaking API changes

Piwik can now handle an unlimited number of users having Super User access (#2589 #4564). In the past Piwik was limited to one Super User who was defined in the config file. From now on all users with Super User access are defined in the database the same way a regular user is. This brought some API changes but we will stay backward compatible until the first of April 2014. This gives you some time to migrate any custom plugins you may use. Although there is a layer for backward compatibility we recommend to make sure your plugin works with Piwik as soon as possible before April 1st.

List of changes

Deprecated methods

The following methods are deprecated and we recommend to use the new methods from now on. There are also some methods which won't be replaced so make sure to adjust the logic of your plugin.

\Piwik\Piwik::isUserIsSuperUserOrTheUser => \Piwik\Piwik::hasUserSuperUserAccessOrIsTheUser
\Piwik\Piwik::checkUserIsSuperUserOrTheUser => \Piwik\Piwik::checkUserHasSuperUserAccessOrIsTheUser
\Piwik\Piwik::isUserIsSuperUser => \Piwik\Piwik::hasUserSuperUserAccess
\Piwik\Piwik::setUserIsSuperUser => \Piwik\Piwik::setUserHasSuperUserAccess
\Piwik\Piwik::checkUserIsSuperUser => \Piwik\Piwik::checkUserHasSuperUserAccess
\Piwik\Piwik::getSuperUserLogin => No replacement, returns the userLogin of the first Super User we find in the database
\Piwik\Piwik::getSuperUserEmail => No replacement, returns an empty string from now on
\Piwik\Access::isSuperUser => \Piwik\Access::hasSuperUserAccess
\Piwik\Access::checkUserIsSuperUser => \Piwik\Access::checkUserHasSuperUserAccess
\Piwik\Access::getSuperUserLogin => No replacement, returns the userLogin of the first Super User we find in the database
\Piwik\Access::setSuperUser => \Piwik\Access::setSuperUserAccess
\FakeAccess::checkUserIsSuperUser => FakeAccess::checkUserHasSuperUserAccess
\FakeAccess::setSuperUser => FakeAccess::setSuperUserAccess
\FakeAccess::getSuperUserLogin => No replacement

Config Super User

As mentioned, the Super User was defined in the config and you have accessed the Super User's data either by using a convenient method like Piwik::getSuperUserLogin or directly via the Config object as follows:

\Piwik\Config::getInstance->superUser

As the config user is no longer defined in the config this will no longer work in the future. To stay backward compatible we return the first super user found in the database. This is not necessarily always the same user. So if you have used the super user login for instance to identify any entry in the option table like '${superuserlogin}_myoptionname' we recommend to migrate the optionname to 'myoptionname'.

Extended Auth Interface

The last change affects plugins who specifcy their own Authentication mechanism, for instance when using the custom LoginLDAP plugin. From now on the interface \Piwik\Auth (https://github.com/piwik/piwik/blob/master/core/Auth.php) requires the methods setTokenAuth and setLogin. There is no backward compatibility layer but we had a look at some plugins defining a custom Authentication adapter to make sure those methods are already defined there as expected.

After updating the plugin

So you have updated your plugin but this means your plugin will no longer work with previous Piwik versions. Therefore you should define the minimum required version in your plugin.json (http://developer.piwik.org/guides/distributing-your-plugin#getting-your-plugin-ready-to-publish) file as follows:

"require": {
"piwik": ">=2.0.4-b5"
}

@mattab
Copy link
Member Author

mattab commented Feb 24, 2014

We published a new blog post informing plugin developers of the breaking core API changes in 2.1: http://piwik.org/blog/2014/02/piwik-2-1-changes-plugin-developers/

@mattab
Copy link
Member Author

mattab commented Feb 24, 2014

Added a new user guide at: Managing Super Users

@mattab
Copy link
Member Author

mattab commented Feb 24, 2014

Updated faq What is the super user in Piwik?

@mattab mattab added this to the 2.1 - Piwik 2.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Website matomo.org For issues related to our matomo.org website. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant