WordPress.org

Forums

Advanced: Roles and Capabilities: Adding New Capabilities? (7 posts)

  1. dColumbus
    Member
    Posted 2 years ago #

    I'm trying to create an internally private type of community ... and the current Capabilities are great, except for the fact that I don't want users of a certain Role being able to see anything that someone else has created (posts, pages, etc)

    I'd love to be able to create some new Capabilities that would compliment my application, such as: view_others_posts ... I just don't want a user of a specific Role to see anything except what they've created.

    Another REALLY important example would be the Media Library ... I do NOT want users of a certain Role being able to see ANYTHING besides what they themselves have added to the Media Library. Make sense? ...for Admins, they can see all, but I need some serious private limits for users that belong to new custom Role

    Are there any ways of doing so?

  2. deepbevel
    Member
    Posted 2 years ago #

    there should be a capability called "see private posts" . so if you make all posts private, you can assign this capability to certain users, and not others.

  3. dColumbus
    Member
    Posted 2 years ago #

    @deepbevel, thanks for the answer.

    I don't see any indication that "private posts" has anything to do with the Media Library.

    Is there no way to affect capabilities for the Media Library through a hook or other method?

  4. deepbevel
    Member
    Posted 2 years ago #

    the way I handled that part was to use a front end post form that allowed each user to have their own upload folder, it's the only one accessible to the user. not sure what's involvd in making that happen otherwise.

    i imagine your users access the media library from admin?

  5. dColumbus
    Member
    Posted 2 years ago #

    Yeah, they login to the back-end and utilize the Media Library as usual ... I just don't want them to be able to see anything beyond what they themselves have uploaded/created.

  6. deepbevel
    Member
    Posted 2 years ago #

    understood, I've wanted the same many times and had to use front-end post methods. What you're doing is interseting. If you feel inclined to share what you did when done that would be great.

  7. deepbevel
    Member
    Posted 2 years ago #

    You may want to take a look at this thread, about half way down someone posted code that hides all but the author's posts AND MEDIA on the back end. I tested and it works.

Topic Closed

This topic has been closed to new replies.

About this Topic