Support » Plugin: BuddyPress Docs » Completely restricting normal users from creating

  • Hi David,

    Fist of all THANK YOU for an amazing plugin! I’m super exited about it and the way it empowers me to share valuable information with people.

    So here’s the deal:
    I’m running a Buddypress forum with multiple groups that have Docs enabled. I’m using the plugin only for admins/moderators of the groups to share information with the group members. Not as collaboration.

    In order to do that I know you can choose to only have admins/mods create new docs. But that doesn’t restrict users to edit the docs, which is something I’d rather they didn’t do.

    Also, when a doc is opened the “Create doc” button surfaces, giving the user the impression they can create a doc in the group. They don’t know that it’s for their profile.

    In general, we don’t need normal user to be able to create docs, only have access to them and comment.

    So my question is: Is there a way to completely keep normal users from creating doc’s (also on their own profile)?

    Cheers,
    Jesper

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Cavins

    (@dcavins)

    Hi Jesper-

    Sure, you can prevent normal users from creating docs. Something like this map_meta_caps filter will be a good start: https://gist.github.com/dcavins/2f185a4023a67a9506a68fcd328de61c

    Take this snippet as a starting point and add your own requirements for who can create docs.

    Best,

    -David

    You are a superstar! That worked like a charm! This is maybe asking for a lot, but since you have been so awesome, maybe you can tell me how to hide the user menu without also hiding the “Create doc” button for admins/mods?

    Through CSS I can only find #bp-docs-all-docs and not individual menu items.

    Thanks a million!

    Jesper 🙂

    Plugin Author David Cavins

    (@dcavins)

    Hi Jesper, I don’t know exactly what you mean. If you’re wanting to change the navigation items, wait until BP Docs 2.1 lands soon, then overwrite the “tabs” file using BuddyPress’s template hierarchy:
    https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/

    I will def look forward to that. I’m not looking to change them but actually just hide them. So the only thing visible is the “Create doc” button.

    We don’t need any other navigation, than the one provided by the file overview 🙂 Is that also what you are referring to?

    I just saw that users still are able to edit the folders of a group without being an admin/mod. I would be so AWESOME(!) if there was an overall option, to prevent users from doing anything else than reading/commenting – unless they are admin/mods 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Completely restricting normal users from creating’ is closed to new replies.