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
When upgrading from before 1.x, SuperLinks view permissions may not be correct #2797
Comments
That is interesting. I would have though someone else would have reported that by now given the 1.x lifetime. We will have to double check the upgrade code as I thought this was part of it. |
for superlinks, the following code should be adjusting the realms as appropriate: db_install_execute('DELETE FROM superlinks_auth WHERE pageid NOT IN(SELECT id FROM external_links)');
db_install_execute('INSERT INTO user_auth_realm (user_id, realm_id) SELECT userid, pageid+10000 FROM superlinks_auth');
db_install_drop_table('superlinks_auth'); This is found in the install/upgrades/1_0_0.php upgrade file. |
above three lines upgrade permission of |
I'm confused because Superlinks became External Links I believe. |
"Superlinks" plugin permission is configured in table plugin_realms. During upgrade, 1_0_0.php only handle "superlinks internal permission" from table 'superlinks_auth ' about "permission of superlinks created content".
|
Was there anything already populated in the external links table ? I notice that the first query is only checking that the external links id does not exist in superlinks, but I suspect it should also have the -1000 on it. |
Wait, I may be missing that the External Links will have it's own realm anyway. |
OK, to be clearer on this the security for the links are being transferred, but the manage permission for |
Actually, my bad. External Links should be available to any user with access to a link. External Links is the ability to view the tab not the management of it. So, we will patch this in 1.2.5 to reapply that realm if they have access to a link. |
I've submitted a change to the 1_0_0.php file that should rectify the upgrade. If you have already upgraded, it wouldn't be right to run this automatically since you could have adjusted the permissions already and this could have changed them without your knowledge if run in a later upgrade. If you do need to grant view permissions to the external links tab for all users you can run:
|
Describe the bug
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: