• Resolved bughead

    (@bughead)


    Hi Team,

    I’m not sure if I’m doing anything wrong or if there is a bug.

    My users tasks should only be visible to themselves and not others. I can see users able to view and complete other users tasks.

    Below is my configuration.
    Fresh wordpress install.
    Version: WordPress 6.0.1
    Plugins: Zephyr Project Manager 3.2.42 (Free, not premium)
    No other plugins.

    <Page Setup>
    Created Page name: “test”
    Added shortcode: [zephyr_task]
    Published Page.

    <User Setup>
    Created user test1 and test2
    In Zephry Project > Teams & Members > Enabled both test1 and test2 as “Allow Access”
    In Zephry Project > Teams & Members > changed roles of test1 and test 2 to “Zephyr – User”
    In Zephry Project > General Settings > ZPM User. I’ve only enabled “View Assigned Tasks”

    “Allow users to only view their own files” is enabled.
    “Allow users to view other members on the site” is diabled.

    <Created Task for user Test1>
    As admin, In Zephry Project > Tasks > I create a new task. In the settings I give the task a name, description, and assign it to user Test1.

    <Testing with user Test2>
    When navigating to the test page as Test2, I can see and tick the arrow to complete test1’s task.

    <Testing with no logged in user>
    When navigating to the test page without logging in, I can see and tick the arrow to complete test1’s task.

    Regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    Thanks for the feedback and sorry for the delay in response from my side.

    To show the current logged in users tasks only, the shortcode with the assignee=”current” attribute: [zephyr_task assignee=”current”] is usually used. However, I have made the changes to instead use the user roles to hide the tasks as well, so this is resolved in the updated version. Alternatively, you can also download the latest version from here to update it manually if needed –
    https://drive.google.com/file/d/1PkIT59WdZZWv9DFHNm_uF5BLGcNtqKSt/view?usp=sharing.

    I hope this helps.

    Thanks for your time.

    Kindest regards,
    Dylan`

    Thread Starter bughead

    (@bughead)

    Thanks for the response.

    I downloaded your file and it hasn’t resolved the issue. I tested this on another fresh install from scratch and other users, as well as non-logged in users, are able to see all tasks listed using [zephyr_task].

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    Thanks for the response.

    In order to show the tasks with the shortcode for the current logged in user only, could I ask you to change the shortcode to the below:
    [zephyr_task assignee=”current”]

    This will make sure it only shows the current logged in users tasks.
    By design, this shortcode allows non-logged in users to view the tasks to provide a way to show tasks in the frontend to non-users, but setting the assignee=”current” property will make it so that they are private.

    I hope this helps.

    Kindest regards,
    Dylan

    Thread Starter bughead

    (@bughead)

    Thanks again for your updates.
    I still have questions related to this.

    So in which situations does “View Assigned Tasks” come into effect? If it doesn’t work for [zephyr_task] then where does it work?

    My situation is as follows. I’m using my WordPress as a social media platform and my users have profile pages. For each users profile page, there will be a specific “Tasks” page which I want to show the assigned tasks for that user.

    e.g. site.com/user/5 would be the url for user 5 profile page. Then I can use the shortcode something like this [zephyr_task assignee=”5”].

    – When User 5 is viewing that page, they will obviously see their own tasks.
    – If another user with role “ZPM User” is viewing that page, they won’t be able to see user 5’s tasks because they have “View Assigned Tasks” only.
    – If I (Zephyr – Administrator) is viewing user 5’s profile page, I can see all user 5’s tasks, because I have “View Tasks” assigned.

    Hopefully that makes sense.

    How can I achieve that?

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    Thanks for the detailed information.

    The “View Assigned Tasks” and “View Tasks” permissions are for the actual dashboards (the backend dashboard and frontend project manager dashboard).

    I have made a change to the plugin, to make it work as you requested and with the permissions as that does make more sense. So I apologize for the confusion.

    After installing the version below, please add the logged_in parameter to the shortcode: [zephyr_task logged_in=”true”]

    This will make it so that only logged in users can view the tasks, and that users can only view their assigned tasks, and users with “View Tasks” can view all tasks as requested.

    https://drive.google.com/file/d/1JeY9LUlu188FNwuUmLMPqF6pCX2hmjmk/view?usp=sharing

    Please let me know if this helps and works as expected.

    Hope you have a great weekend further.

    Kindest regards,
    Dylan

    Thread Starter bughead

    (@bughead)

    I’ve just tested it and it’s not working for me yet.

    Using [zephyr_task assignee=”5”] and logging in with another user (not 5) I can still see 5’s tasks. Might have you done differently?

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    Hope you are doing well.

    It seems like you might be using the previous shortcode attributes.
    Could I ask you to replace [zephyr_task assignee=”5″] with the following shortcode instead:

    [zephyr_task logged_in=”true”]

    Please let me know if this works as expected for you – and works for your requirements as it works here, but just want to confirm with you.

    Thanks again for your time.

    Kindest regards,
    Dylan

    Thread Starter bughead

    (@bughead)

    Thanks again – I don’t think that meets my specific requirements.

    This is what I want to do, all on the front end.
    I have a social media platform already, and user A has a profile page. There is a menu item specific to that users page where it says “Tasks”. When any user clicks on that link for that user it opens a page which includes [zephyr_task assignee=”A″] (or whoever’s page was viewed previously. Not related to who is logged in but what user’s page we are viewing at the time).

    If a Zephyr admin opens that page – they can see all of user A’s tasks.
    If user A opens that page, they can see all their own tasks.
    If user B opens that page, they can’t see user A’s tasks (Unless – they share the task with that user)
    If an unlogged in user opens that page, they can’t see the tasks (I believe you’ve fixed this already.

    So using [zephyr_task logged_in=”true”] on that page won’t work, because I (as admin) want to be able to go into each users profile page, and see their assigned tasks.

    • This reply was modified 2 years, 8 months ago by bughead.
    Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    I am sorry for the back and forth and for the misunderstanding from my side.
    Could I kindly ask you to try this shortcode:
    [zephyr_task logged_in=”true” assignee=”5″]

    – The “logged_in” parameter sets it so that logged out users won’t be able to see the tasks.
    – The “assignee” parameter set it so that it only shows assignee #5’s tasks, to users who have the permission to do so.
    – The page will then only show user #5s tasks, to user 5 and roles that have the ability to view all tasks, such as administrators.

    I attached a screenshot example of it below, logged into the different accounts with annotations just to make sure I understand correctly.

    https://pasteboard.co/OhCP6P2NvKnV.png

    Is this correct?

    Thanks again for your time and patience, I truly appreciate it.

    Kindest regards,
    Dylan

    Thread Starter bughead

    (@bughead)

    Awesome! that works. I had to re-download and install zephyr-project-manager (20) but now it works.

    Thank you so much.

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi,

    That is great to hear, thanks for letting me know.

    I will be releasing this update soon.

    Kindest regards,
    Dylan

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Users able to see eachothers tasks’ is closed to new replies.