Hi,
in a fresh OMP 3.1.1-4 installation, I get “Access denied” when klicking the plugin tab (Settings → Website).
In SettingsPluginGridHandler, function authorize, $pluginName is empty.
best,
Carola
Hi,
in a fresh OMP 3.1.1-4 installation, I get “Access denied” when klicking the plugin tab (Settings → Website).
In SettingsPluginGridHandler, function authorize, $pluginName is empty.
best,
Carola
Hi @carola,
Does your account have an Editor or Manager role, or only Site Administrator?
Regards,
Alec Smecher
Public Knowledge Project Team
Only admin.
Hi @carola,
Hmm, I’m having trouble duplicating this locally. Is this an install from the .tar.gz
file, or the ojs-3_1_1-4
git tag, or the ojs-stable-3_1_1
git branch? Do you have multiple journals? What user groups is your user_id
active in (see user_user_groups
in the DB)?
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher,
I have the latest git branch, but OMP not OJS.
There were changes in PKPHandler, if I undo the changes in the lines after “// Let the authorization decision manager take a decision.” I can access the plugin grid. _roleAssignments is not empty and _roleAssignmentChecked is false.
And I got manager role automatically, so it’s admin + manager.
Hi @asmecher
if I add
else {
import(‘lib.pkp.classes.security.authorization.ContextAccessPolicy’);
$this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
}
to SettingsPluginGridHandler → authorize I can access the grid
OJS docs/release-notes/README-3.1.1: #4024# Ensure RoleBasedHandlerOperationPolicy is used where addRoleAssignment is used
best,
Carola
Hi @carola,
Ah, you’re right – Unfortunately I forgot to port that aspect of #4024 to OMP. Your proposal is correct and I’ve committed that solution to the master
and omp-stable-3_1_1
branches for the next release. (#4024# Ensure RoleBasedHandlerOperationPolicy is used where addRoleAs… · pkp/omp@54014d7 · GitHub)
Regards,
Alec Smecher
Public Knowledge Project Team
Hello there. I had the same issue and I applied the code change. Now I don’t get the warning I had before but I still cannot see the installed plugins in the tab. the loading icons goes on and on…
Hi @giellemme,
Check your PHP error log for details.
Regards,
Alec Smecher
Public Knowledge Project Team
It is a shared hosting. Any way to log errors in omp?
Hi @giellemme,
The PHP error log should always be available, even on shared hosting. But if it really isn’t, you could inject a few ini_set
directives into index.php
to send errors to a specified file. See e.g.: https://stackoverflow.com/questions/3531703/how-to-log-errors-and-warnings-into-a-file
Regards,
Alec Smecher
Public Knowledge Project Team
Regards @asmecher
I have the same error, the output of my php is the following
“Now I don’t get the warning I had before but I still cannot see the installed plugins in the tab. the loading.”
[Tue Nov 20 22:56:07.129514 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP Parse error: syntax error, unexpected ‘this’ (T_STRING), expecting variable (T_VARIABLE) or ‘$’ in /opt/rh/httpd24/root/var/www/html/libros/controllers/grid/settings/plugins/SettingsPluginGridHandler.inc.php on line 99, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129542 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP Stack trace:, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129558 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 1. {main}() /opt/rh/httpd24/root/var/www/html/libros/index.php:0, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129571 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 2. PKPApplication->execute() /opt/rh/httpd24/root/var/www/html/libros/index.php:64, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129583 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 3. Dispatcher->dispatch() /opt/rh/httpd24/root/var/www/html/libros/lib/pkp/classes/core/PKPApplication.inc.php:247, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129595 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 4. PKPComponentRouter->route() /opt/rh/httpd24/root/var/www/html/libros/lib/pkp/classes/core/Dispatcher.inc.php:134, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129606 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 5. PKPComponentRouter->getRpcServiceEndpoint() /opt/rh/httpd24/root/var/www/html/libros/lib/pkp/classes/core/PKPComponentRouter.inc.php:247, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129623 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 6. instantiate() /opt/rh/httpd24/root/var/www/html/libros/lib/pkp/classes/core/PKPComponentRouter.inc.php:224, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
[Tue Nov 20 22:56:07.129634 2018] [:error] [pid 14093] [client 186.84.165.129:50176] PHP 7. import() /opt/rh/httpd24/root/var/www/html/libros/lib/pkp/includes/functions.inc.php:203, referer: http://18.223.195.114/libros/index.php/editoriald/management/settings/website
my configuration is
S.O : LINUX RHEL 7
PHP: 56
HTTP: 2.4
OMP: 3.1.1.4
I await your prompt reply
David.
Hi @drueda,
I suspect there’s a typo in a modification to controllers/grid/settings/plugins/SettingsPluginGridHandler.inc.php
on line 99.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi, @asmecher
Thank you very much, it was indeed a typographical error.
It opens without problems.
David.