XF 1.5 Bulk remove node permissions?

Alpha1

Well-known member
After vb3 -> xf import a lot of node permissions have come out erroneous. I have a lot of usergroups and in many nodes there now are revoke permissions set. Is there a set all node usergroup permissions to 'not set' ? This would give me a clear starting point.
 

Dadparvar

Well-known member
Use this query:
Code:
DELETE FROM `xenforo`.`xf_permission_entry_content` WHERE `xf_permission_entry_content`.`content_id` = 1;

where:
Code:
xenforo => name of your database
1 => id of node
Tested on a forum with more than 1500 nodes and worked fine.
 

Dadparvar

Well-known member
Well, I'm not aware of a single line of code to do for all nodes, and I did it by copying x time and use notepad++ or intellij idea to put 1 to 1500 at the and of them smartly within few seconds. Then ran all of them and... Thats it. All nodes permissions for all groups were reset.
 
Use this query:
Code:
DELETE FROM `xenforo`.`xf_permission_entry_content` WHERE `xf_permission_entry_content`.`content_id` = 1;

where:
Code:
xenforo => name of your database
1 => id of node
Tested on a forum with more than 1500 nodes and worked fine.
Would you still recommend this as a safe procedure for xenforo 2.1?

I only ask because it was posted 3 years ago and I think some things may have changed.

Thanks.

UPDATE: I'm going to say 'no'. It works, but there are associated tables that are affected. Running the 'permissions update' tool helps clean up the database, but who knows if that's enough.
 
Last edited:
Top