• Resolved smithcreate

    (@smithcreate)


    I have several users created with “Employer” roles as this is the HR team that will be posting and editing job openings on our website. I added the User Role Editor plugin and made some changes so that the role Employer can:

    delete_others_job_listings
    delete_published_job_listings
    edit_others_job_listings
    (and many more functions)

    This is needed so that everyone can work as a team to post and or edit/delete job openings.

    But in testing, if a user with the role of Employer views all jobs in the Job Dashboard and clicks to edit a job listing that someone else created, they get a message “Invalid listing”. The page will load “?action=edit&job_id=9024” which is the post ID.

    I believe this is probably something to do with the User Role Editor settings for the Employer role, but I’m not sure what function is causing this.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Cena (a11n)

    (@cena)

    Hi @smithcreate ,

    The job dashboard is only designed to work for individual employers; even administrator roles cannot view/manipulate a given employer’s job dashboard on the front-end.

    You could possibly change this behavior, but it would require custom code which is outside of our scope of support.

    More information is here:

    https://wpjobmanager.com/document/the-employer-role/
    https://wpjobmanager.com/document/the-job-dashboard/

    > a user with the role of Employer views all jobs in the Job Dashboard and clicks to edit a job listing that someone else created, t

    I did do a quick test with User Role Editor by creating a new employer user, applying permissions to edit/manage/etc WPJM listings, but jobs created by other employers do not turn up in the new employer’s job dashboard at all. So I’m curious how you set up a collated job dashboard (it sounds like). 🙂

    Best,
    Cena

    Thread Starter smithcreate

    (@smithcreate)

    Hi Cena,

    It sounds like it is not possible then to have multiple users with the Employer role to view and edit ALL job listings, is this correct? If so, this is a big setback for our HR department who as a team manages all of our job listings.

    I added a code snippet recommended from a previous topic, Job Dashboard display ALL jobs so that anyone with the role as Employer could see all job listings. But if the user can’t edit another users job listing, this isn’t necessary.

    Plugin Author Renatho (a11n)

    (@renathoc)

    Hi @smithcreate!

    In a quick check, I think you can try to use the job_manager_user_can_edit_job filter to allow all employers to edit the job listings.

    You can see this filter here: https://github.com/Automattic/WP-Job-Manager/blob/master/wp-job-manager-functions.php#L726

    But it seems you can find new things to customize. And as Cena said, it gets out of scope of this support. In this case, you’d need to dig into Job Manager code to tweak other possible cases that you would have problems.

    You can check the code directly through your plugins folder or through Job Manager repository: https://github.com/Automattic/WP-Job-Manager

    Best,
    Renatho

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Edit Listing Returns “Invalid listing”’ is closed to new replies.