How do I assign User-Level security to a custom content type?

Site is
I would like to please add a user-level custom content type, with the possibility to add relational lookup tables, also user-level security.
Users by default create their own lookup entries in predefined list and edit views using pods is my current ideal. I can learn pods but I can't find anything with wording for user level security at record-level. I think it's adding a user ID to records and lookup tables and queries.

    • Aurelio

      Thank you so much for your response.
      I am not trying to limit a post type to a certain user role. I am trying to give users their own unique access to a post type.
      For example, I am creating a journal table with Pods right now and adding relational lookup. The issue is that entries will be user-sensitive. I want the entries a user makes to be specific and private to them by default, so that each entry has a user ID associated as well that is used to filter so that the user only sees their own entry.
      Ideally, it would work much like buddypress activities with privacy add-on enabled, as on my site when some one enters a new post, they select if they want the post to be visible to just them, friends, site members or public. I would like to create or find a more data-dense post type with similar permission control. I am trying to create a list view of activities with selection drop down for locations and other things, but at the end am hoping somehow that user-level security can be added to it so by default their sensitive journals are private. If possible, I would like to add the buddy press privacy type control where they could assign sharing permission to these more condensed entries, but if that's too hard I just want them to be able to have privacy with their journals using this new list view and edit post type I am creating for them, unless there already exists something better and easier :slight_smile:

  • Aurelio

    Josh at Pods explained I was trying to make content visible only to author and gave code to try. I will try this on a custom Pods type. Is there a plugin you can use to make a custom content type have this "records visible only to author" wrap? Does this seem secure enough to make sure people's journals don't show up in search?
    Thank you!

  • Patrick

    Hey there @Aurelio

    I hope you are well today!

    Yes, the code snippet provided in that thread will limit accessibility to only the user who authored the content.

    Note that if you have some kind of archive views of that content too, you'll need to edit the appropriate templates to wrap the corresponding function calls in that code to. Otherwise, when viewing archives, all content will display by default.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.