Dear Team,
I am experiencing an issue with the current version of the OpenWISP2 controller where the “Send Command” option is not visible for users, even after assigning the appropriate permissions and confirming that the device is connected. However, when logged in as a superuser, the “Send Command” option is visible and works as expected.
In the logs located at /opt/openwisp2/log, I see the following error:
Forbidden: /admin/config/device/connection/command/ui/schema.json
I have also included the corresponding frontend error (attached/pasted below) for your reference.
Could you please advise how I can resolve this issue on the same controller version without upgrading to version 1.2.0?
pip show openwisp-monitoring
Name: openwisp-monitoring
Version: 1.1.3
Summary: OpenWISP Monitoring
Home-page: http://openwisp.org
Author: OpenWISP
Author-email: sup...@openwisp.io
Name: openwisp-controller
Version: 1.1.2
Summary: OpenWISP Controller
Home-page: http://openwisp.org
Author: OpenWISP
Author-email: sup...@openwisp.io
Front end side error:
jquery.min.641dd1437010.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading 'length') TypeError: Cannot read properties of undefined (reading 'length')
at showRelevantTemplates (https://**********/static/config/js/relevant_templates.min.6d683bed2b81.js:6:709)
at addChangeEventHandlerToBackendField (https://************/static/config/js/relevant_templates.min.6d683bed2b81.js:6:193)
at bindDefaultTemplateLoading (https://************/static/config/js/relevant_templates.min.6d683bed2b81.js:14:300)
at HTMLDocument.<anonymous> (https://***********/admin/config/device/15771746-e9eb-4c58-a562-0d8d3199b097/change/?_changelist_filters=monitoring__status__exact%3Dok:413:24)
at e (https://**********/static/admin/js/vendor/jquery/jquery.min.641dd1437010.js:2:30158)
at t (https://************/static/admin/js/vendor/jquery/jquery.min.641dd1437010.js:2:30460) undefined
S.Deferred.exceptionHook @ jquery.min.641dd1437010.js:2
t @ jquery.min.641dd1437010.js:2
setTimeout
(anonymous) @ jquery.min.641dd1437010.js:2
c @ jquery.min.641dd1437010.js:2
fireWith @ jquery.min.641dd1437010.js:2
fire @ jquery.min.641dd1437010.js:2
c @ jquery.min.641dd1437010.js:2
fireWith @ jquery.min.641dd1437010.js:2
ready @ jquery.min.641dd1437010.js:2
$ @ jquery.min.641dd1437010.js:2Understand this warning
jquery.min.641dd1437010.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at showRelevantTemplates (relevant_templates.min.6d683bed2b81.js:6:709)
at addChangeEventHandlerToBackendField (relevant_templates.min.6d683bed2b81.js:6:193)
at bindDefaultTemplateLoading (relevant_templates.min.6d683bed2b81.js:14:300)
at HTMLDocument.<anonymous> (change/?_changelist_filters=monitoring__status__exact%3Dok:413:24)
at e (jquery.min.641dd1437010.js:2:30158)
at t (jquery.min.641dd1437010.js:2:30460)
showRelevantTemplates @ relevant_templates.min.6d683bed2b81.js:6
addChangeEventHandlerToBackendField @ relevant_templates.min.6d683bed2b81.js:6
bindDefaultTemplateLoading @ relevant_templates.min.6d683bed2b81.js:14
(anonymous) @ change/?_changelist_filters=monitoring__status__exact%3Dok:413
e @ jquery.min.641dd1437010.js:2
t @ jquery.min.641dd1437010.js:2
setTimeout
(anonymous) @ jquery.min.641dd1437010.js:2
c @ jquery.min.641dd1437010.js:2
fireWith @ jquery.min.641dd1437010.js:2
fire @ jquery.min.641dd1437010.js:2
c @ jquery.min.641dd1437010.js:2
fireWith @ jquery.min.641dd1437010.js:2
ready @ jquery.min.641dd1437010.js:2
$ @ jquery.min.641dd1437010.js:2Understand this error
jquery.min.641dd1437010.js:2 GET https://********admin/config/device/connection/command/ui/schema.json?&organization_id=undefined 403 (Forbidden)
Regards,
logu