culturecreates / footlight-app

Footlight CMS Front-end
https://cms.footlight.io
3 stars 0 forks source link

admin only fields as filters in list view not working #1470

Open troughc opened 2 days ago

troughc commented 2 days ago

Admin only taxonomies can be set as filters. these filters appear in the List view and should only be visible to an Admin. I tested this on Tout Culture with the member of taxonomies - there is one for organizations and one for people. I was able to set it as a filter: however, it doesn't work (doesn't filter correctly); and, the filter is visible to me when I sign on as a guest. Expected behaviour: Admin only filters work to filter according to the taxonomy and are only visible to Admins.

Steps:

  1. turn on 'make this taxonomy available as a filter" in Taxonomies for one that is restricted to Admin only. (this is already done for the member of an organization)
  2. Go to General settings and select the taxonomy under Filter personalization (this one is in ORganizations) and then save.
  3. go to Organizaitons - the filter is there. Try it, it doesn't filter correctly
  4. log in as a guest - the filter is still displayed in organizations.
  5. Do the same with the individual member taxonomy - this one does seem to filter but it is available for guests as well.
troughc commented 1 day ago

@sahalali I'm not sure if this is for you or @AbhishekPAnil to estimate?

AbhishekPAnil commented 19 hours ago

cc @troughc Work needs to be done in both frontend and backend.

When used as a filter : Taxonomy fields designated as admin-only should be visible to admins. The work for the above needs to be done in the frontend only.Below are the estimates for the same.

Estimate : 10H

  1. Add a common logic to detect the admin only taxonomies and display them accordingly to the specific user type. -3- 4
  2. Update the logic in Events,Organization,People and Place workspaces.1+1+1+1.
  3. Testing - 2