hi
I am trying to make a list of users based on the ACL (acces control list which is based on DTreeACL) for items like folders and so on.
Lets say, i have an Folder with the ID=11567 ('Customer Service' in this case).
This folder hes his ACL, the list of users and groups which have acces to it.
Now , i want a list of all users only. (including the users found in the groups of the ACL, and users in nested groups. (bcos groups can contain groups)).
I tryed fwe querries, i can post some examples. I cant manage to select the whole three of users.
Here comes the KUAFChildren table handy .
The KUAF table is the one containing the names i need in the end.
SO, do i need to use hierarchical querries?
here is an example i tryed :
and this gives me this result:
'The statement terminated. The maximum recursion 100 has been exhausted before statement completion.'
I am trying to make a list of users based on the ACL (acces control list which is based on DTreeACL) for items like folders and so on.
Lets say, i have an Folder with the ID=11567 ('Customer Service' in this case).
This folder hes his ACL, the list of users and groups which have acces to it.
Now , i want a list of all users only. (including the users found in the groups of the ACL, and users in nested groups. (bcos groups can contain groups)).
I tryed fwe querries, i can post some examples. I cant manage to select the whole three of users.
Here comes the KUAFChildren table handy .
The KUAF table is the one containing the names i need in the end.
SO, do i need to use hierarchical querries?
here is an example i tryed :
Code:
WITH
cteUserList ( GroupID, ChildID, EmpLevel)
AS
(
SELECT ID, ChildID, 1
FROM KUAFChildren
WHERE ID = 11676
UNION ALL
SELECT kc.ID, kc.ChildID,
r.EmpLevel + 1
FROM KUAFChildren kc
INNER JOIN cteUserList r
ON kc.ID = r.GroupID
)
SELECT
GroupID
EmpLevel,
(SELECT id FROM KUAFChildren
WHERE ID = cteUserList.ChildID) AS someTitleID
FROM cteUserList
ORDER BY EmpLevel, ChildID
'The statement terminated. The maximum recursion 100 has been exhausted before statement completion.'