WordPress.org

Ready to get started?Download WordPress

Forums

WP Project Manager
Roles in wp project manager (6 posts)

  1. Yassem
    Member
    Posted 7 months ago #

    Hello, great plugin. I use it at work and just bought the frontend version.
    My problems are :
    - Only editors or administrators can create new projects. I'd like subscribers to be able to create projects.
    - Editors can see all the projects. I'd like a role which can create new projects but which can see only the projects they are in.

    Is there a solution to make that possible ?
    Thank you very much

    http://wordpress.org/plugins/wedevs-project-manager/

  2. Dest4sd
    Member
    Posted 5 months ago #

    +1 to that questions

  3. sturz
    Member
    Posted 5 months ago #

    Finally i succeeded in changing the code so that everyone can create a project (i'm not that far to specify which role should get the right to create a project, but hey, after weeks of research [i'm not a programmer], i've found a way)

    What you have to do is to comment out certain if functions where admin_right is checked.

    1) ajax.php in folder wedevs-project-manager\class\
    Comment out lines 59-64:

    /*       //fail if current user is not editor or above
              if ( !$pro_obj->has_admin_rights() ) {
                echo json_encode( array('success' => false) );
                exit;
            }
    */

    2) project.php in folder wedevs-project-manager\class\
    Comment out lines 332-336:

    /*
            if ( current_user_can( $admin_right ) ) {
                return true;
            }
    */

    Warning: The return false function after it should not be commented out.

    3) index.php in folder wedevs-project-manager\views\project\
    Comment out within line 12 the if condition:

    <?php /*if ( $project_obj->has_admin_rights() ) */{ ?>

    Same procedure within line 52:

    <?php /*if ( $project_obj->has_admin_rights() )*/ { ?>

    Have fun :-)

  4. sturz
    Member
    Posted 5 months ago #

    I've just found out an error caused by the comment out in number 2.

    Commenting out the project.php lines 332-336 withdrew the possibility to edit an existing project. Instead of commenting out simply change the return after the if condition to true, even if the user has no admin_right:

    2) project.php in folder wedevs-project-manager\class\
    return true; instead of return false;

    if ( current_user_can( $admin_right ) ) {
                return true;
            }
    
            return true; //originally return false
        }

    sorry :-) if someone finds another bug, please let me know.

  5. Dest4sd
    Member
    Posted 4 months ago #

    Great job, thank you!!!
    =)

  6. nizamuddinbabu
    Member
    Posted 4 months ago #

    Hi guys
    All of you will be happy that roles and permission is nicely added the pro version of this plugin
    You can add managers, co-workers and clients in your project. You've absolute control over the user roles and what they can see. Check the pro version link
    http://wedevs.com/plugin/wp-project-manager/

Reply

You must log in to post.

About this Plugin

About this Topic