threadloom
Well-known member
Hi,
We're trying to retrieve node permissions by user group instead of user id. For now, we're looking specifically at user groups 1 (Unregistered) and 2 (Registered).
Based on reading the KB article and other posts here, it seems like we have to use the permission combinations to do that, but we're not 100% sure of the logic. Our understanding of permission combinations is that they're a way to find permissions for a user who is in all of the groups in user_group_list.
Currently we have something like this:
For the user group, fetch the permission combination where user_id = 0 and user_group_list = "<1|2>".
And:
Questions:
Thanks in advance...
We're trying to retrieve node permissions by user group instead of user id. For now, we're looking specifically at user groups 1 (Unregistered) and 2 (Registered).
Based on reading the KB article and other posts here, it seems like we have to use the permission combinations to do that, but we're not 100% sure of the logic. Our understanding of permission combinations is that they're a way to find permissions for a user who is in all of the groups in user_group_list.
Currently we have something like this:
For the user group, fetch the permission combination where user_id = 0 and user_group_list = "<1|2>".
And:
Code:
XenForo_Node_Model->getNodePermissionsForPermissionCombination(<combination ID>)
Questions:
- Can we assume there will be exactly 1 row in xf_permission_combinations where user_id = 0 AND user_group_list = "<1|2>"?
- How would we fetch the correct permission combination for other user groups, where it appears that there is no row for that group in user_group_list by itself?
Thanks in advance...