You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering if there is a way to show and hide certain items in the list view.
Scenario
Using the blog template. I have a Post schema that may be set to public, meaning accessible to any site visitor. The problem then occurs when an author reaches the admin UI and all public posts populate the list at http://KEYSTONE/posts
What I'm trying to accomplish
When a user visits the Keystone UI, they will only see their authored posts in the list view. This can be overridden if permission is allowed for the User to manage any post.
What I've Tried
In the itemView I'm able to accomplish logic that is close to what I'm looking for because of the item object.
In itemView this creates clear difference when the user visits a Post they are able to (or not) author. It would be even better if I could display some message like "Can not edit this post"
The listView falls short in 2 ways
defaultFieldMode does not have access to individual item objects so I cannot run logic per list item.
the hidden property only hides fields values and does not filter out per list item (that are in this case set to public but NOT authored by user)
Separate from access & permissions
Just to be clear, I'm asking for filtering separate from CRUD filtering. My CRUD filtering is working as intended and these public posts are accessible by the frontend the way I'd expect.
I am asking for some better user experience filtering that allows me to show and hide things in the Post list ui to certain authors that only pertain to them when editing said Posts
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am wondering if there is a way to show and hide certain items in the list view.
Scenario
Using the blog template. I have a Post schema that may be set to
public
, meaning accessible to any site visitor. The problem then occurs when an author reaches the admin UI and allpublic
posts populate the list athttp://KEYSTONE/posts
What I'm trying to accomplish
When a user visits the Keystone UI, they will only see their authored posts in the list view. This can be overridden if permission is allowed for the User to manage any post.
What I've Tried
In the
itemView
I'm able to accomplish logic that is close to what I'm looking for because of theitem
object.Here is a snippet of my
Post.ts
SchemaCurrent result
In
itemView
this creates clear difference when the user visits a Post they are able to (or not) author. It would be even better if I could display some message like "Can not edit this post"The
listView
falls short in 2 waysdefaultFieldMode
does not have access to individualitem
objects so I cannot run logic per list item.hidden
property only hides fields values and does not filter out per list item (that are in this case set topublic
but NOT authored by user)Separate from access & permissions
Just to be clear, I'm asking for filtering separate from CRUD filtering. My CRUD filtering is working as intended and these public posts are accessible by the frontend the way I'd expect.
I am asking for some better user experience filtering that allows me to show and hide things in the Post list ui to certain authors that only pertain to them when editing said Posts
Beta Was this translation helpful? Give feedback.
All reactions