---
title:        "Role based ##WHERE## condition"
description:  "You can easily modify your repeater to only display the documents belonging to a specific Role."
url:          https://www.jeroenfurst.nl/blog/Role-based-WHERE-condition
date:         2010-01-29
category:     Web parts and page templates
tags:         [Web parts and page templates, Security and permissions]
reading_time: 1
---

# Role based ##WHERE## condition

> You can easily modify your repeater to only display the documents belonging to a specific Role.

You can easily modify your repeater to only display the documents belonging to a specific Role. To do this, update your query with the following:

**Step 1.** Using the "CMS\_Tree" table, join the field: "NodeALCID" with the "ACLID" field from the "CMS\_ACL" table.

**Step 2.** Join the "CMS\_ACL" table with the "CMS\_ACLItem" table on the "ACLID" field.

**Step 3.** Finally join the "CMS\_Role" table with the "CMS\_ACLItem" table on the "RoleID" field.
 
 With the above steps you can easily apply Role based filtering.