ericbdev
10-08-2013, 07:54 PM
Hello,
I am working on a custom back end that pulls a list of documents from vBulletin's database.
One intricate aspect of the vBulletin set up is that 90% of the channels are restricted to one User Groups's visiblity. Because of this, it would not work for my client to show a user documents which he can't see through the forum.
If that was unclear at all, here is an example:
UserA is in Channel1
UserB is in Channel1, Channel2.
UserB uploads Document9 in Channel2. UserA should not be able to see Document9.
UserA uploads Document8 in Channel1. UserA, UserB should be able to see Document 8.
Ideally, I would like a function that is able to match a User's Group to visible Channels, but I would settle for a list of nodeids that a user is able to access.
Does anyone have any ideas of how I might achieve this?
That or, is somone able to explain to me how I can extrapolate this information from the permission table? I see it has listed nodeid, and groupid, but I am unable to accurately determine the correlations.
select TABLEPREFIX_node.nodeid,TABLEPREFIX_node.routeid,T ABLEPREFIX_node.userid, TABLEPREFIX_node.title
from TABLEPREFIX_node left join TABLEPREFIX_permission on (TABLEPREFIX_node.nodeid = bfn_permission.nodeid )
where TABLEPREFIX_permission.groupid = 6
//groupid 6 should be admin, and therefore see everything
(The above querie is what I had tried, but does not return to me enough information to get what I need)
I would appreciate any snippets, or advice anyone would have to offer!
Thanks
I am working on a custom back end that pulls a list of documents from vBulletin's database.
One intricate aspect of the vBulletin set up is that 90% of the channels are restricted to one User Groups's visiblity. Because of this, it would not work for my client to show a user documents which he can't see through the forum.
If that was unclear at all, here is an example:
UserA is in Channel1
UserB is in Channel1, Channel2.
UserB uploads Document9 in Channel2. UserA should not be able to see Document9.
UserA uploads Document8 in Channel1. UserA, UserB should be able to see Document 8.
Ideally, I would like a function that is able to match a User's Group to visible Channels, but I would settle for a list of nodeids that a user is able to access.
Does anyone have any ideas of how I might achieve this?
That or, is somone able to explain to me how I can extrapolate this information from the permission table? I see it has listed nodeid, and groupid, but I am unable to accurately determine the correlations.
select TABLEPREFIX_node.nodeid,TABLEPREFIX_node.routeid,T ABLEPREFIX_node.userid, TABLEPREFIX_node.title
from TABLEPREFIX_node left join TABLEPREFIX_permission on (TABLEPREFIX_node.nodeid = bfn_permission.nodeid )
where TABLEPREFIX_permission.groupid = 6
//groupid 6 should be admin, and therefore see everything
(The above querie is what I had tried, but does not return to me enough information to get what I need)
I would appreciate any snippets, or advice anyone would have to offer!
Thanks