Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Unable to Edit DisplayData as 'Manager'

More
8 years 8 months ago #1950 by Thinamani
Unable to Edit DisplayData as 'Manager' was created by Thinamani
Hi There,

I have assigned a user account in Joomla as "Manager" access group.
I have given the Manager access group permissions in VISFORMS to edit,delete,create,edit state,edit own,delete data,edit data to allowed.

But when the user logs into the control panel and clicks on DisplayData and tried to edit a record. It says Edit not permitted.
How can I enable users under the Manager group to be able to edit DisplyaData in visforms. Currently only SuperUsers are able to edit.

I have a screenshot of the error message but not too sure how to attach it to this forum.

More
8 years 8 months ago #1951 by Administrator AV
Replied by Administrator AV on topic Unable to Edit DisplayData as 'Manager'
Hi,

I have tested this feature and actually use it with the same permissions as you describe (manager) without problems.
Is it possible, that the record set was checked out by a super user? I think there is sometimes a problem in Joomla! when you try to open a checked out record set. You have to check it in first.

Can you mail me the screenshot to contact@vi-solutions.de

Can you make a screenshot of your permission settings for VISFORMS and for the form as well?

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 8 months ago #1952 by Thinamani
Replied by Thinamani on topic Unable to Edit DisplayData as 'Manager'
Hi Aicha,
I have just emailed the screen shots to you.

More
8 years 8 months ago #1955 by Administrator AV
Replied by Administrator AV on topic Unable to Edit DisplayData as 'Manager'
Hi,

thanks for your help.
I think you found a bug in Visforms.
You can fix it with 2 code changes yourself.
I will add these changes to the core and they will be part of the next Visforms release, too. But as this bug is part of Visforms since I added the edit data feature for the administration and nobody ever found the bug before, I think there are not so many people using ACL to restrict data edit in administration. Releasing an update needs proper testing of all aspects and therefore some time and work. And many people are not so happy about too frequent software updates at all, so I will not release a new Visforms version which contains just this a bug fix but will wait until there are other code changes (from new features or other bugs) as well.

In order to fix it your self please find the file administrator/components/com_visforms/views/visdata/tmpl/default.php
(Make a copy of the original file as a backup, if something goes wrong).
Find the following code line in this file (about line 169)
Code:
$canEdit = $user->authorise('core.edit.data', 'com_visforms.visform.'.$row->id);
Replace it with
Code:
$canEdit = $user->authorise('core.edit.data', 'com_visforms.visform.'.JFactory::getApplication()->input->getInt( 'fid', -1 ));

Find the file administrator/components/com_visforms/controller/visdata.php
(Make a copy of the original file as a backup, if something goes wrong).
Find the following code passage
Code:
protected function allowEdit($data = array(), $key = 'id') { // Initialise variables. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); $userId = $user->get('id'); // Check general edit permission first. if ($user->authorise('core.edit.data', 'com_visforms.visform.' . $recordId)) { return true; } return false; }
Replace it with
Code:
protected function allowEdit($data = array(), $key = 'id') { // Initialise variables. $fid = JFactory::getApplication()->input->getIntr('fid', 0); $user = JFactory::getUser(); $userId = $user->get('id'); // Check general edit permission first. if ($user->authorise('core.edit.data', 'com_visforms.visform.' . $fid)) { return true; } return false; }
The permissions of data edit in administration should work then with your settings as expected.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: Thinamani

More
8 years 8 months ago #1959 by Thinamani
Replied by Thinamani on topic Unable to Edit DisplayData as 'Manager'
Hi Aicha,

Thanks for the quick reply.
I managed to find the second file to edit: administrator/components/com_visforms/controller/visdata.php

I was unable to located the following: administrator/components/com_visforms/views/visdata/tmpl/default.php

I found the default.php and the required line to edit under the following directory:
administrator/components/com_visforms/views/visdatas/tmpl/default.php

There 2 folders in the views directory:
visdata and visdatas
The default.php was under visdatas.

After your suggested edits. The permissions now works are expected.
Thank you for you help.

More
8 years 8 months ago #1961 by Administrator AV
Replied by Administrator AV on topic Unable to Edit DisplayData as 'Manager'
Hi,

thanks for your reply.
I mistyped the path to the second folder.
You figured the correct path and file.

I'm glad to here, that this solved the problem.
I will pull the changes into the core then.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum