• Resolved MIFTA WIDAYA

    (@miftawidaya)


    Hello WP Document Revisions Support Team,

    I hope this message finds you well. I am a user of the WP Document Revisions plugin and have been enjoying its features for managing documents on my WordPress website. However, I have encountered a couple of issues that I believe could be improved to enhance user experience and clarity.

    The first issue is related to the usage of the term “owner” within the plugin. Currently, the term “owner” is used as a substitute for “author,” which I find a bit misleading for users who read it. It may imply that the user listed as the “owner” is the actual document owner, which is not the case. The “owner” is merely the user who uploaded or submitted the document. To address this confusion, I suggest considering alternative terms such as “submitter” or “uploader” to better represent the user’s role accurately. Could you please guide me on how to make this name change effectively? Should I use the ‘gettext’ filter, or does WP Document Revisions provide its own filter for handling such changes?

    The second issue I encountered is with the “owner” filter when accessed by a subscriber on the admin document list screen. The filter currently displays all registered users on the website, even if they have never posted any documents. In my opinion, the filter should only display the names of users who have actually posted documents. Interestingly, the plugin’s readme file states that “Owner metabox no longer displays if the user does not have the ability to edit_others_documents.” However, this behavior doesn’t seem to be reflected in the actual admin document list.

    To address this, I tried using the ‘Admin Column’ plugin to hide the “owner” column specifically for subscribers. While the column is successfully hidden, the “owner” filter that should not appear still shows up on the admin document list page. I would appreciate your guidance on how to resolve this issue and ensure that the filter behaves correctly.

    Thank you for your attention to these matters.

    Best regards,
    Mifta Widaya

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor nwjames

    (@nwjames)

    @miftawidaya

    Thank you for raising this.

    The implementation of the term “owner” predates my involvement with the plugin, so I cannot say what considerations went into its naming. I would imagine that it was to differentiate from the actual document author.

    I do see it is as the owner of the document in the context of the WordPress site. It is more than the mere submitter or uploader of the document. They give it its title and its taxonomies. Or assign the document to another owner. More than that, they can delete the document from the website.

    There are 4 occurrences of the term “owner” in the plugin – all within translatable strings. They use the strings “Owner”, “All owners” and “Document Owner”.

    However, to have another term, you should use the filter “gettext_wp-document-revisions”. This is a dynamic filter name (look up “gettext_{$domain}”) but it means that it will only be invoked for translations within this plugin, rather than all translation, thus improving efficiency and avoiding side-effects.

    To youer second issue, please note that there are two places where there is a user dropdown. One is in the Document List screen and the other is when editing a specific document and there can be a side metabox for the owner to assign the ownership of the document to another user. Currently both of these show a dropdown of all users.

    I can confirm the comment “Owner metabox no longer displays if the user does not have the ability to edit_others_documents.” is accurate. It is referring to the second usage, that is, when editing a specific document. If you do not have the “edit_other_documents capability, then you will not see the metabox – and will not be able to reassign ownership.

    I agree with your comment that both dropdown should not contain a list of all users – and I will be proposing a change along these lines.

    The Document List should contain a list of all users that are published document owners or are owners of private documents if you have read_private_documents capability.

    For the reassignment list, it should only contain those users with edit_documents capability. After all, you should only be able to give the ownership to someone who can do sometime with it.

    I am investigsting how to implement this, and will revert in due course.

    Regards,

    Neil James


    Thread Starter MIFTA WIDAYA

    (@miftawidaya)

    @nwjames

    Thank you for taking the time to address my concerns in such detail. Your explanation has provided valuable insights into the considerations behind the term “owner” within the plugin. I understand that the term carries a deeper significance within the WordPress site’s context, and it involves more than just being a submitter or uploader. Your explanation has shed light on the roles and responsibilities associated with this term, and I see how it is a more encompassing concept.

    After further reflection and reading the plugin’s description, I’ve realized that the plugin’s original intention was likely aimed at team projects within an internal organization. This context differs from my use case, which involves collaboration with various external organizations. Many of these users might not be familiar with WordPress terminology, and the dashboard itself might not even resemble the typical WordPress interface. With this in mind, I’ve followed your guidance and used the ‘gettext_wp-document-revisions’ filter to adjust the terminology as follows:

    add_filter( 'gettext_wp-document-revisions', 'change_wp_document_revision_strings', 10, 3 );
    /**
     * Code snippet to change the "Owner" text in the WP Document Revisions plugin
     *
     * @link https://developer.wordpress.org/reference/hooks/gettext_domain/
     */
    function change_wp_document_revision_strings( $translated_text, $text, $domain ) {
        if ( 'wp-document-revisions' === $domain ) {
            switch ( $text ) {
                case 'Owner':
                    $translated_text = 'Submitter';
                    break;
                case 'All owners':
                    $translated_text = 'All submitters';
                    break;
                case 'Document Owner':
                    $translated_text = 'Submitted by';
                    break;
            }
        }
        return $translated_text;
    }

    I appreciate your confirmation regarding the behavior of the “Owner metabox” and how it aligns with the user’s capabilities.

    Regarding your proposal for refining the user dropdowns, I completely agree. Emphasizing the limitation of displayed names to users with specific capabilities not only addresses potential security concerns but also contributes to a more streamlined and secure user experience.

    Furthermore, I have taken additional steps to enhance privacy and security in this regard. I have opted to temporarily hide the specific dropdown filter for users who do not possess the “read_private_documents” capability.

    It’s important to note that the user dropdown filter could inadvertently display sensitive information, such as usernames or user IDs. By taking this approach, I am prioritizing security and privacy in my usage of the plugin.

    https://prnt.sc/VOKTVsrs0Plc

    While the dropdown filter feature could indeed facilitate certain tasks, I believe that, given the security and privacy considerations, temporarily concealing this filter for users lacking the “read_private_documents” capability is a prudent step. Additionally, it aligns with my approach to prevent potential misuse of usernames for unauthorized access.

    I understand that implementing these changes requires time, and I want to express my gratitude for your commitment to investigating and proposing suitable solutions.

    Thank you once again for your support and guidance. I’m looking forward to any updates that will enhance the usability and security of the WP Document Revisions plugin.

    Best regards,
    Mifta Widaya

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Addressing the Author Terminology and Owner Filter Issue’ is closed to new replies.