Skip Navigation

[Resolved] restric view

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 15 replies, has 2 voices.

Last updated by ericW-5 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#631821

Hi Shane,

We recently put in place a view to see all applications for a specific job offer : hidden link

Only the recruiter who published the job (parent post) should be able to see this list of applications. Currently anyone can see the applicants list. How can we restrict this list to the recruiter only ?

Thanks in advance
Eric

#631921

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Do you have any specific role assigned to recruiter users? If yes:
- If you have installed Access plugin - you can use [toolset_access] shortcode.

For example:

toolset_access role="recruiter" operator="allow"]
add your view's shortcode here
[/toolet_access]

OR

You can use [wpv-conditional] shortcode to check current user role.

For example - to check 'administrator" role:

[wpv–conditional if="( '[wpv-current-user info='role']' eq 'administrator' )"]
 
Display your custom fields for administrator role
 
[/wpv–conditional]

More info:
https://toolset.com/documentation/views-shortcodes/#wpv-conditional
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

#631924

Thanks for your reply.

I think this is should be more specific as I have several recruiters posting jobs here.
I need only 1 recruiter (not all recruiters) to see the list of applications. This specific recruiter is the person who posted the job offer. Other recruiters and all candidates should not see this list.

Thanks in advance
Eric

#631930

I would need a code which says :

IF "current user is the parent author" please show me the applications /child posts links.
ELSE hide the applications

Thanks for your help
Eric

#631934

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry but you need to tell me which is your child post and which is your parent post.

Basically - to check author ID with current logged in ID. You can use [wpv-conditional] shortcode.

[wpv–conditional if="( '[wpv-current-user info='id']' eq '[wpv-post-author format='meta' meta='ID']' )"]
  
display things here
  
[/wpv–conditional]
#631942

Hi

Basically relationship is as follows :
hidden link IS CHILD OF hidden link

Recruiters can post job offers using CRED form : hidden link
And candidates can apply using another CRED form : hidden link

Which means for every job offer several applications can appear. There are various job offers published by several recruiters and for each job offer several applications should come up.

I just need the application list to be shown only to the specific recruiter who originally posted the job offer.

Thanks
Eric

#631948

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see you added nested view's and passed the author id and filter another view by shortcode attribute (passed author id).

It looks correct to me - could you please share test case example - whats wrong here with following display:
=> hidden link

#632039
Capture 050418.PNG

Example :
=> hidden link

In this example, applications should only be visible to the job offer author. Currently everyone can see the list of applications. Please see attached file.

Thanks in advance
Eric

#632286

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I've changed the filter as given under for your child view "Resume test"

Publication author filter
Select publications whose author is identical to the one on the page where this view is displayed .

Could you please confirm - it works as expected now.

#632321
capture060418.PNG

Sorry this does not work.
I had the list of resumes (not yet restricted to recruiters) but now I have nothing at all.

Can you please change what you did to get back to the list of resumes.
Then I will find another solution to restrict the view.

#632323

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see you modified the filter again:
=> hidden link

I just added the said filter and I do not see its available there.

#632324

I was doing tests.
I now put your filter again but this does not work.
I need to get back to the former view I had yesterday, thanks in advance

Eric

#632327

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - for this page: hidden link

I see the 'gardien" post author ID = 13 - correct?

So you want that if user with ID 13 is logged in - only he can see the view - otherwise not - correct?

#632332

I just want to get back to what I had yesterday.
Basically what I had yesterday was - for each job offer - a list of resumes sent by applicants.

E.g. on this job offer "gardien" there was one application "weric2938" as you can see on the attached file sent yesterday.

(Do not worry about restricing acess to this view as I will restrict how people can see items using conditional tags afterwards)

#632352

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - you are back to where you were yesterday: hidden link