BuddyPress Docs
[resolved] Default doc permissions (6 posts)

  1. laurahreniucu
    Posted 2 years ago #


    I would like to change the default doc permissions (read/edit). For now, they are set for "anyone". I want them changed to "admins-mods". Where can i edit to get that?

    Thanks :)


  2. laurahreniucu
    Posted 2 years ago #

    Found it. Don't remember where now, found it some time ago. Just forgot to close this.


  3. gabokappa
    Posted 1 year ago #

    Hey Laura, do you remember where you were able to change the default doc permission? I want to make sure that when users using my site decide to create documents in their groups, by default, the doc permissions for 'reading' is automatically set to the group, rather than 'anyone'

    Thanks in advance

  4. laurahreniucu
    Posted 1 year ago #

    Hi gabokappa.

    I'm not really sure, but i guess it was in "\plugins\buddypress-docs\includes\query-builder.php" in "set_up_levels" function

    Search for comment (should be around line 545)

    // The 'read' setting must also be saved to a taxonomy, for
     // easier directory queries

    Below this I have

    $read_setting = 'admins-mods';
     bp_docs_update_doc_access( $this->doc_id, $read_setting );

    I hope this solves your request.

  5. trans1t
    Posted 1 year ago #

    Take a look at functions.php line 445

    $default_settings = array(
    		'read'          => 'anyone',
    		'edit'          => 'loggedin',
    		'read_comments' => 'anyone',
    		'post_comments' => 'anyone',
    		'view_history'  => 'anyone',
    		'manage'        => 'creator',

    Wish there was a way to set this without hacking the bp docs core... still looking into that.

  6. trans1t
    Posted 1 year ago #

    OK so if I had looked a few lines down, I would have seen that there's a filter right below that, you can set your defaults like this:

    function custom_bp_docs_permissions($doc_settings, $doc_id, $default_settings) {
      $custom_default_settings = array(
        'read'          => 'group-members',
        'edit'          => 'group-members',
        'read_comments' => 'group-members',
        'post_comments' => 'group-members',
        'view_history'  => 'group-members',
        'manage'        => 'group-members',
      if($doc_id == 0 || $doc_settings == $default_settings) {
        return $custom_default_settings;
      } else {
        return $doc_settings;

    Hope this helps someone else out there...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Docs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.