Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query folders in a group

Status
Not open for further replies.

CherylAnderton

Technical User
Nov 21, 2016
30
US
Does anyone know the syntax to query folders in a group? I've tried a few and my query runs forever. I don't believe a have the correct join.

select d.name from dtree d, dtreeacl dc
where dc.rightid = /*the id of the group */
and d.dataid = dc.dataid
 
I wrote this descriptively to help you, DTreeACL contains one row each for each ACL present in the Object.The last statement will show you what you are looking for
but I like to be less cryptic .If you join KUAF.ID to DCL.RightID you can then find the real name of user or group as well

--First enumerate the Individual dataid in a folder
select * from DTreeAncestors DTA where DTA.AncestorID=24276345 ;

--Get name etc by joing to DTREE enumerate the Individual dataid in a folder
select DT.Name,DT.DataID,DT.SubType from DTreeAncestors DTA ,DTree DT where DT.DataID=DTA.DataID
and DTA.AncestorID=24276345 ;

--For each DataID get a row of DtreeACL Info for each DataID it will have 4 stanadrd rows standing for User,Group,
--PA&System and any below the line ACL
select DCL.OwnerID, DCL.ParentID, DCL.DataID, DCL.RightID, DCL.[Permissions], DCL.ACLType, DCL.See, DT.Name,DT.DataID,DT.SubType
from DTreeAncestors DTA ,DTree DT ,DTreeACL DCL where DT.DataID=DTA.DataID
and DCL.DataID = DT.DataID and DTA.AncestorID=24276345 ;


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
That just gives me subtype 142, I need all files which that group as access.
 
The query I provided is not specific to subtype=142 it starts its processing from a container object.If your question is I have group called "My Secure Group" with a KUAF.ID=23456
then one can write it like this
Select * from DTreeACL where RightID=23456 ,this will give you all the Objects that has that Group applied
If you join it with DTree and with SubType=0 you will have folders that have it. Note these are the Direct ACL does not mean much as that is not how
LL determines how one gets access to an object as LL Knows if a user is seeing something because of the direct presence of an ACL or a Nested(computed) ACL.



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
That's it... thank you and thank you for the explanation. It helped with another query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top