Users sees only its posts

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

Hi @scryde,

This is covered in our Complete Application Tutorial.

    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);
            }
        }
    }