Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By milanshah
#815288
Hi,
I want to set permissions for group but processmaker is not showing my groups in permissions.
Attachments
glpi-user.png
glpi-user.png (25.38 KiB) Viewed 232 times
permission.png
permission.png (57.01 KiB) Viewed 232 times
By amosbatto
#815301
Strange. What version of PM are you using? Bitnami or manual install?
By amosbatto
#815311
I just tried creating a new process permission in PM 3.2.1 Community and I can assign it to a group. Does this problem occur with all groups or just with your "GLPI users" group?

Have you installed multiple languages in ProcessMaker? If you created the group when logged in using one language, and are now using a different interface language, then the database query for the groups in the CONTENT table might now find the group. (ProcessMaker shouldn't have this problem, but it can occur.) You need to edit the properties of the group again and save them again, so it will create a record in the current interface language in the CONTENT table for the group.
By milanshah
#815318
This problem is occurring with all groups of processmaker and I have only installed one language i.e. English.
and my colleague also installed new processmaker but he is also unable find groups in permissions
By amosbatto
#815334
Did you import this group using LDAP or Advanced LDAP? What happens if you create a new group? Do you still see the same problem?

Do this in the wf_workspace database (or whatever you named your database):
SELECT * FROM GROUPWF WHERE GRP_TITLE='GLPI users';
SELECT C.* FROM GROUPWF G, CONTENT C WHERE G.GRP_TITLE='GLPI users' AND G.GRP_UID=C.CON_ID;

Post your results.
By milanshah
#815335
GLPI users are imported from GLPI and i also created few users in processmaker and assigned them to new group in processmaker but that group is also not getting displayed in permission dropdown.

SELECT * FROM GROUPWF WHERE GRP_TITLE='GLPI users';
Code: Select all
"3001111755b4c7b1934ac33018699477"	"GLPI Users"	"ACTIVE"	""	"NORMAL"

SELECT C.* FROM GROUPWF G, CONTENT C WHERE G.GRP_TITLE='GLPI users' AND G.GRP_UID=C.CON_ID;
Code: Select all
"GRP_TITLE"	""	"3001111755b4c7b1934ac33018699477"	"en"	"GLPI Users"
By amosbatto
#815369
I don't see any problem with your database records for the group. I don't think anyone has tested PM with GLPI users. It may be different than OpenLDAP or Active Directory.

For a user which was imported from GLPI, can you post its database record?
SELECT * FROM USERS WHERE USR_USERNAME='XXXXXXXXX';

What happens if you create users inside the PM interface (don't import them from GLPI) and then create a new group and only assign users to that group which were created inside PM? Can you still not see the group when creating a process permission.
By milanshah
#815385
Hi,
SELECT * FROM USERS WHERE USR_USERNAME='XXXXXXXXX';
Code: Select all
"8116989145b4c7b7cd29099020662147"	"6"	"glpi"	"102dc8eda1b0c34ccc60e8355139ab33"	"glpi"	"glpi"	"[email protected]"	"2035-12-31"	"2018-07-16 07:03:24"	"2018-07-25 08:40:13"	"ACTIVE"	""	""	""	""	""	""	""	""	""	""	""	"2018-07-16"	"PROCESSMAKER_OPERATOR"	""	""	"NORMAL"	"0.00"	""	""	\N	""	""	\N
And I also tried making users and group in processmaker but still that group didn't show up in permissions.
By amosbatto
#815409
Perhaps importing users from GLPI is screwing something up and ProcessMaker can't get groups correctly. Try deleting all your users that you imported from GLPI and see if that fixes the problem. I have never seen this problem before, but nobody has tested PM with GLPI.
By amosbatto
#815476
This is bizarre. If you want me to check it, you can export the workspace for your second installation of ProcessMaker where you don't have any imported users and email me the .tar file at [email protected]

I'd like to see if I can replicate this problem.
#815628
Hello, I have this problem too.
When attempting to add permission to the process the registered groups do not appear.

I already deleted the installation and database and reinstalled both but the problem still occurs. I have already tested with LDAP and ProcessMaker (MYSQL) authentication, but in both cases the problem occurs.

I performed manual installation on Debian 9, ProcessMaker version 3.2.1-community.


Sorry, my English is not good.
By amosbatto
#815637
edsondalsoquio and milanshah,
I am using PM 3.2.1 Community (manual install) in Debian 8.4 and I am not seeing this problem.

Are you using the "admin" user (or another user with the PROCESSMAKER_ADMIN role) when you try to assign the group to the permission?

OK, let's investigate. The first thing is to check the response being returned by the /api/1.0/{workspace}/groups?filter=X endpoint.

In the ProcessMaker source code, edit the file workflow/engine/src/ProcessMaker/Services/Api/Group.php and in the index() function at lines 48-50, change the code from:
Code: Select all
             $response = $group->getGroups($arrayFilterData, null, null, $start, $limit);

            return $response["data"];
To:
Code: Select all
             $response = $group->getGroups($arrayFilterData, null, null, $start, $limit);
            file_put_contents("/tmp/groups_endpoint_response.txt",  json_encode($response["data"]));
            return $response["data"];
Then, try to assign a group to a permission in ProcessMaker. Then, post the contents of your /tmp/groups_endpoint_response.txt file here.
#815651
I am using the user "admin", I can already have another user with the "admin" permissions.


I performed some tests by inserting the line in the file Group.php, however nothing is generating in the folder / tmp.
From what I've noticed that point in Group.php is only being used when permission is saved in the process. I used the User.php file of the same path in lines 35 to 37 inserting the same line of code is including the permission. The file in / tmp is only generating after saving the permission.

I also performed a test by changing the ProcessPermissions.php file located in /engine/src/ProcessMaker/BusinessModel/ by inserting the code between lines 59 and 75 in some combinations.
This is also only generating a file when saving the permissions.

It would have the location of the code line that loads all the groups and users, or even the line that performs the filter interaction with the loaded data, so I believe it would be possible to perform a test before saving the permission.
By amosbatto
#815656
In my installation of PM 3.2.1 Community (manual install) in Debian 8.4, using PHP 5.6.20, MySQL 5.5.47 and Firefox 51, when I make the change the change to the source code that I described above, I am seeing the /tmp/groups_endpoint_response.txt being written the moment I type in the Group or User text box in the Create Permission dialog box.

What versions of PHP and MySQL are you using and what web browser are you using?

If you press F12, to open your web browser's debugger and go to the "Console" or "Network" tab, you should see a POST to the /api/1.0/{workspace}/groups?filter={X} and /api/1.0/{workspace}/groups?filter={X} endpoints when you type in text in the Group or User field.

Here is what I'm seeing in the Firefox debugger for the POST:
restGroupsCallPermission.png
restGroupsCallPermission.png (101.65 KiB) Viewed 8 times
and response:
restGroupsResponse.png
restGroupsResponse.png (105.29 KiB) Viewed 8 times
Are you seeing the POST and response?
Jalali Calendar

This topic says that this function " jdate fu[…]

messages

I just tried it in PM 3.2.1 and executing cron.p[…]

Session Expiration Issue

Hi .. I am using Mobile User Experience. In thi[…]

What happens if you change your HTML code to this?[…]