xml_cdr calls delete

Status
Not open for further replies.

goose2600

Member
Dec 18, 2018
51
1
8
I noticed cannot delete calls from the xml_cdr app in a fresh Fusionpbx install, but in my old installation was possible.
Is there a setting somewere to enable this feature?

Thanks!
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Have a look in Advanced->Group manager and click on the permissions link for superadmin.

There are quite a few relatively new permissions for CDRs, you probably need xml_cdr_delete.
 
  • Like
Reactions: goose2600

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I tried to check xml_cdr_delete for the group "user" and it allows me to check it but when I hit save it reverts back to unchecked.

Any ideas?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
@Andrew Byrd I have seen this behavior before, I'm struggling to remember what caused it now. I think it may have been something to do with the group_uuid being blank in the v_group_permissions table.

I have just added the xml_cdr_delete permission to group user on one of my test boxes and it worked fine, but I did notice that superadmin already had this permission and if I tried to remove it by unchecking the box, after I hit save the check came back.

So I issued the following query:
Code:
select * from v_group_permissions where permission_name = 'xml_cdr_delete';

And this was the result:
Code:
        group_permission_uuid         | domain_uuid | permission_name | group_name |              group_uuid            
--------------------------------------+-------------+-----------------+------------+--------------------------------------
f74457ad-7002-4972-b3e6-0464a0077986 |             | xml_cdr_delete  | superadmin |
6ce22e8d-a68c-4bf6-8fd7-24ac0b229925 |             | xml_cdr_delete  | user       | 41ae078a-7042-4f4d-9d94-e361f612c245
(2 rows)

As you can see group_uuid is null for superadmin, so maybe this could be the reason, but as I said I really cannot remember.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Ok, I tried this out on my test box for you. This worked for me, but also bear in mind that running Update - App Defaults may also fix the issue, but I have not tried that. I tend to avoid App Defaults as much as possible - don't ask me why.

First (in my case) i needed to find out the uuid of the superadmin group:
Code:
select * from v_groups where group_name = 'superadmin';

Result:
Code:
              group_uuid              | domain_uuid | group_name | group_protected |     group_description     | group_level
--------------------------------------+-------------+------------+-----------------+---------------------------+-------------
 92e77a3b-95dc-44ce-bfbd-66e56c18010f |             | superadmin | false           | Super Administrator Group |          80
(1 row)

Now using the uuid, I update the v_group_permissions table:
Code:
update v_group_permissions set group_uuid = '92e77a3b-95dc-44ce-bfbd-66e56c18010f' where group_name = 'superadmin' and permission_name = 'xml_cdr_delete';

Now the xml_cdr_delete entries look like this:
Code:
        group_permission_uuid         | domain_uuid | permission_name | group_name |              group_uuid             
--------------------------------------+-------------+-----------------+------------+--------------------------------------
 6ce22e8d-a68c-4bf6-8fd7-24ac0b229925 |             | xml_cdr_delete  | user       | 41ae078a-7042-4f4d-9d94-e361f612c245
 9a885249-abd3-45ab-8311-19e07dadec72 |             | xml_cdr_delete  | superadmin | 92e77a3b-95dc-44ce-bfbd-66e56c18010f
(2 rows)

Now when I check or uncheck the xml_cdr_delete permission for superadmin it works!
 
Status
Not open for further replies.