# User Permission on foreign entries

**URL:** <https://discourse.getcockpit.com/t/user-permission-on-foreign-entries/1863>\
**Category:** Support\
**Created:** [March 11, 2021, 5:10pm UTC](https://discourse.getcockpit.com/t/user-permission-on-foreign-entries/1863 "2021-03-11T17:10:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [March 22, 2021, 11:11am UTC](https://discourse.getcockpit.com/t/user-permission-on-foreign-entries/1863/2 "2021-03-22T11:11:01Z")

</div>

Have a look here:

> [@Restrict content to the content authors](https://discourse.getcockpit.com/t/restrict-content-to-the-content-authors/285):
>
> I want my users to be able to view and edit only collection posts they have created. Is this something I would implement in the config file or programmatically? If so, any help would be much appreciated. Also, I will have a hidden boolean field created on each collection post only accessible by admions. Once that field is set to true only admins should be able to see/edit that post. This access to author’s own content will be more restrictive than just user groups.

Alternatively to the context rules, you can use the `collections.find.before` event to adjust the filter to search only for entries with `_by => $user['_id']`.

---

_[View the full topic](https://discourse.getcockpit.com/t/user-permission-on-foreign-entries/1863)._
