# Cockpit - Different view rights on same collection?

**URL:** <https://discourse.getcockpit.com/t/cockpit-different-view-rights-on-same-collection/658>\
**Category:** General\
**Created:** [March 14, 2019, 10:13pm UTC](https://discourse.getcockpit.com/t/cockpit-different-view-rights-on-same-collection/658 "2019-03-14T22:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeyjreij](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@joeyjreij](https://discourse.getcockpit.com/u/joeyjreij)\
**Post date:** [March 14, 2019, 10:13pm UTC](https://discourse.getcockpit.com/t/cockpit-different-view-rights-on-same-collection/658/1 "2019-03-14T22:13:21Z")

</div>

Hi guys,

for a customer of me, I need a way to have a blog and event collection where different users can create, edit and delete the collections. The struggle I have is the following:

- How can I only show them the collections posts with them as author.

The only workaround I found was creating for every user a different blog and event collection, and create a different user group per user. This will use a lot of time and a little bit of “hacking”, anyone has a solution?

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [March 15, 2019, 9:13am UTC](https://discourse.getcockpit.com/t/cockpit-different-view-rights-on-same-collection/658/2 "2019-03-15T09:13:04Z")

</div>

Hey @joeyjreij, think you can implement a event of type `collections.find.before.{$name}` and provide the filtering there, e.g.:

```auto
$app->on('collections.find.before.posts', function ($name, &$options) use ($app) {
  $user = $app->module('cockpit')->getUser();
  $options['filter']['_by'] = $user['_id'];
});

```
