Support » Plugin: BuddyPress Docs » How do I add permissions to delete documents for a new user role?

  • Resolved dezmont

    (@dezmont)


    How do I add permissions to delete documents for a new user role?
    I have the “PublishPress Capabilities” plug installed and after selecting all options, the test user still cannot delete documents.

    ScreenShot

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dezmont

    (@dezmont)

    Ok, a little update. I was able to unlock additional delete options for the new user role.

    However, to make document management easier – How to make an additional “Delete” button next to [Read] [Edit] [History] in the main documents dashboard?

    ScreenShot 2

    Plugin Author David Cavins

    (@dcavins)

    One way to customize BP Docs themes/pages is by overriding the templates we’ve provided. See this answer for more detail: https://wordpress.org/support/topic/overriding-and-customizing-templates/

    In your case, you could either override the template docs-header.php or add an action to the bp_docs_header_tabs action, something like this (which I have not tested):

    add_action( 'bp_docs_header_tabs', function() {
    	if ( current_user_can( 'bp_docs_manage', get_the_ID() ) ) {
    		bp_docs_delete_doc_button()
    	}
    } );
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.