# Users sees only its posts

**URL:** <https://forum.radzen.com/t/users-sees-only-its-posts/4622>\
**Category:** Angular\
**Created:** [August 13, 2020, 11:26am UTC](https://forum.radzen.com/t/users-sees-only-its-posts/4622 "2020-08-13T11:26:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scryde](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@scryde](https://forum.radzen.com/u/scryde)\
**Post date:** [August 13, 2020, 11:26am UTC](https://forum.radzen.com/t/users-sees-only-its-posts/4622/1 "2020-08-13T11:26:54Z")

</div>

Hi there  
is any way I can do a multi-user app and every user sees only its postings. only administrator can see all the posts  
thanks I advance

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [August 13, 2020, 12:35pm UTC](https://forum.radzen.com/t/users-sees-only-its-posts/4622/2 "2020-08-13T12:35:14Z")

</div>

Hi @scryde,

This is covered in our [Complete Application Tutorial](https://www.radzen.com/documentation/crm-customize-crud/#associate-opportunities-with-users).

```auto
    public partial class OpportunitiesController
    {
        partial void OnOpportunityCreated(Opportunity item)
        {
            var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value;

            // Set the UserId property of the opportunity to the current user's id
            item.UserId = userId;
        }

        partial void OnOpportunitiesRead(ref IQueryable<Opportunity> items)
        {
            var role = User.FindFirst(ClaimTypes.Role).Value;

            if (role != "Sales Manager")
            {
                var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value;

                // Filter the opportunities by the current user's id
                items = items.Where(item => item.UserId == userId);
            }
        }
    }

```

---

<div class="post-metadata">

**Author:** ![Neil](https://forum.radzen.com/letter_avatar_proxy/v4/letter/n/839c29/32.png) [@Neil](https://forum.radzen.com/u/Neil)\
**Post date:** [March 24, 2021, 5:39pm UTC](https://forum.radzen.com/t/users-sees-only-its-posts/4622/3 "2021-03-24T17:39:29Z")

</div>

> [@korchev](#):
>
> `if (role != "Sales Manager")`

Hi,  
How can I add another role in this line: if (role != "Sales Manager")

I have tried:  
if (role != "Sales Manager" || "Administrator")  
if (role != "Sales Manager", "Administrator")  
if (role != ["Sales Manager","Administrator"])  
if (role != (["Sales Manager","Administrator"]))  
if (role != ("[Sales Manager,Administrator]"))  
if ((role != "Sales Manager") || (role != "Administrator"))  
if (role != "Sales Manager, Administrator")

I would appreciate any help on this.

Thanks

Never mind.. sometimes the obvious is hardest to see.  
I just added the User to both Roles Administrator and Sales Manager  
Forgot about the multi roles.

Cheers
