Syam,
I got this answer from the Buddypress Docs plugin people.
You can filter who can create docs by adding your own callback on the bp_docs_current_user_can_create_in_context hook.
https://github.com/boonebgorges/buddypress-docs/blob/master/includes/functions.php#L326
(You can also add a filter to WP’s capability system if that’s more familiar to you.)
Then, you can make whatever rules you need. If the user can’t create a doc, the button will not appear, and the user will not be able to access the create docs page.
Unfortunately I am not a programmer so the github link does not help me.
Then they mention to add a filter to WP’s capability system!
No idea how to do that. Isn’t that what your WPFRONT provides me?
So now I know that what I want (hide the “create doc” button based on role) can be done but I still don’t know how.
Can WPFRONT help me?
Thanks
Peter