-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field Visibility #2205
Comments
you can use access control, if user read access is denied, they can not see this in admin-ui |
Ok, If I set field's access: false, it doesn't show up. But if a set it as below, It show up in entry list as 'error'. Create button is present too btw. product.js
store.js
access.js
|
@cansoysal did you ever get any clarity on this? |
I have a PR which shows read only fields in the UI as disabled fields. #2258 this is only in the admin-ui, the graphql endpoint has to be protected with access control. if you use a function in access control then this is going to be treated as "maybe true" in admin-ui and let access control protect you |
But then if it's false, I can't access it from graphql either, can I? |
if it is false you can not use it in GraphQL. I believe you still see them in GraphQL which evaluates in the backend and eventually deny based on access control. |
I need to hide some fields and even lists from admin ui, but still would like to use them in graphql. Example -> virtual fields that compute values from user input. |
I dont think that is possible. it is not hard to implement but have not seen this (or similar requests) on priority list for this repo. you might want to fork admin ui to do the same. another caveat for that is you will need to form more packages to pass down configurable info. if #2314 makes it way in, then it is only forking the admin-ui. I even have plan to publish my fork of admin ui with more customisability. |
As far as I know this function has been available in the keystonejs in the earlier versions and has been omitted in the version 5. I guess this has just not been implemented. To me it seems like a core functionality that should be in the main repo. Use case is where the fields are necessary to be accessable from the api, but are cluttering the admin UI. |
We've now added readOnly fields: #2258 |
Hi,
I'm trying to change field visibility depending user's access-role. In Keystone Classic(v4) there are "hidden" and "noedit" properties. Seems like they are missing in V5.
The text was updated successfully, but these errors were encountered: