spTargetedContentPrivs
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ClientsID | int | IN | |
@ContainerGuid | uniqueidentifier | IN | |
@ContainedGuid | uniqueidentifier | IN |
Definition
Copy
CREATE PROC [dbo].[spTargetedContentPrivs]
(
@ClientsID int,
@ContainerGuid uniqueidentifier,
@ContainedGuid uniqueidentifier
) AS
BEGIN
SELECT CR.[Name]
FROM ClientRoles CR
INNER JOIN RoleObjectPrivs ROP1
ON CR.ID = ROP1.ClientRolesID
INNER JOIN RoleObjectPrivs ROP2
ON ROP1.ClientRolesID = ROP2.ClientRolesID
WHERE CR.ClientsID = @ClientsID
AND CR.Deleted = 0
AND ROP1.ObjectGuid = @ContainerGuid
AND ROP2.ObjectGuid = @ContainedGuid
AND ROP1.CanView = 1 -- TRUE
AND ROP2.CanView = 1 -- TRUE
ORDER BY CR.EveryoneRole DESC, CR.[Name]
END