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

    (@eskapism)

    Thanks a lot! I’ll take a look at this and if I like/understand the approach I’ll add it to the next update.

    Thread Starter mattdwo

    (@mattdwo)

    Hi Par,

    One thought appered today, that maybe javascript mouse drag should bind only when there is permission from !current_user_can( CMS_TPV_MOVE_PERMISSION ) I dont know structure of your plugin but maybe you know easy way to do this.
    Other solution could be show user message from ajax.
    I add just die("Error: you dont have permission");
    In this way of course ajax dont show this message to user

    Im not wordpress expert but permission based on core wordpress role capabilities may be useful when more options of this type will come to plugin

    Thanks
    Matt

    Thread Starter mattdwo

    (@mattdwo)

    So maybe I summarize my small corrections to this plugin.
    Its all about permissions.

    I need show tree with posts to Contributor but be sure that Contributor dont publish any of write posts also dont move tree order.

    For example if we work on fresh wordpress installation there is a “Submit for Review” on /post-new.php for Contributor. If I’m not wrong its “Publish” for Admin, Editor and Author by default.

    When enable this plugin and follow the path: Posts->Tree View we have access to radio “Published” before “Add” button. After hit “Add” plugin redirect us to some ajax, but never redirects. Anyway, plugin publish post as Contributor.

    So I merge my fixes with leatest version of this plugin

    Fixes:
    – only roles with right permission can change tree order (Contributor and any role which have unset custom ‘move_cms_tree_view_page’ capability. Plugins sets it on installation)
    – only roles with right permission can publish posts and pages from the tree menu
    Tested on (WordPress 3.6.1)
    Direct download with fixes

    Please note if I missed something.

    Thanks
    Matt

    Plugin Author eskapism

    (@eskapism)

    I added the plugin to github som you can create pull requests and issues there:
    https://github.com/bonny/WordPress-CMS-Tree-Page-View

    Thread Starter mattdwo

    (@mattdwo)

    Thanks, I created pull request

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tree ordering allowed only for admins and editors role based solution’ is closed to new replies.