Fixed Custom permissions not rebuilt after upgrade

Snog

Well-known member
Affected version
2.0 Beta 5
I saw this in Beta 4, and thought maybe I did something. But it happened again in Beta 5.

After an upgrade, you have to change a permission in each user group to rebuild any custom permissions that are set.
 
Also related to this...

If you disable an add-on that has custom permissions and change some other permission after it's disabled, when you re-enable the add-on the permissions need to be loaded/saved for each user group again. In other words, permissions are not rebuilt after enabling an add-on.
 
Also related to this...

If you disable an add-on that has custom permissions and change some other permission after it's disabled, when you re-enable the add-on the permissions need to be set for each user group again. In other words, permissions are not rebuilt after enabling an add-on.

I think that for add-ons it's not automatic, if you look at the installer of the RM you need to call a function in your setup.
 
I think that for add-ons it's not automatic, if you look at the installer of the RM you need to call a function in your setup.
What I'm talking about has nothing to do with the setup (installation) of an add-on. This is about an add-on that is already installed and functioning.

Enabling/disabling an add-on doesn't call the add-on setup routines.

The way this came to my attention is I have several navigation tabs that a permission based. After upgrading to Beta 4 and Beta 5 I noticed the tabs were missing from my display and I hunted for a reason in my add-ons. Then I just saved or changed an unrelated permission in my user group permissions in Beta 5 and the tabs came back. Then I disabled my add-on, changed an unrelated permission, re-enabled the add-on and the tabs were gone. I then went back in and just saved my user group permissions and they came back. So, permissions are not being rebuilt after enabling an add-on or upgrading XF 2 versions.
 
Last edited:
I think I have this fixed for the next release (though I still need to check into something).
 
Back
Top Bottom