Dont display fields that are not readable in the right edge
See original GitHub issueIn this screenshot, the password-hash
field is actually not readable to the user, however the right edge is leaking the existence of this field (although there is no value displayed in it, and it is not editable). We need to hide fields that are not readable in the right edge.
![screen shot 2019-01-09 at 11 21 32 am](https://user-images.githubusercontent.com/61075/50913314-16694a80-1402-11e9-8501-226a0aa8b06a.png)
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Fix site display issues with Compatibility View in Internet ...
Learn how to fix website display problems using Compatibility View in Internet Explorer.
Read more >How to hide columns in HTML table? - Stack Overflow
I want to hide one of the columns based on the requirement but there is no attribute like visible in the HTML table...
Read more >Common Microsoft Edge Problems, and How to Fix Them
Having trouble with Microsoft Edge? You may run into issues with the maturing browser, so we provided a list of possible problems and...
Read more >Hiding fields (not just data) with field-level security
Is it possible to hide the actual fields, not just the data in the fields, based on field-level security settings? It looks like...
Read more >Using field properties, aliases, and table display options
You can check the box to show the field and uncheck it to hide it in ArcMap. ... the individual field's properties are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ideally, we shouldn’t leak the existence of non-readable fields to the client at all. So there would be nothing to ask about. So no, I’d prefer not to make readability something clients can even ask about in the authorization API.
They’re currently leaking because we don’t take permissions into account when we generate the code for the ember data models. There will be ember data attrs for all fields, even ones that aren’t readable. Doing this correctly involves running codegen later, and more dynamically.
If we need a quick solution, we can use the existing API for interrogating the schema.
/api/content-types/YOUR_TYPE
has afields
relationship, anything you can’t see in there isn’t something that we should render in the sidebar.Eventually, the codegen step can happen as part of the cardstack data service when it goes to load cards. I can imagine that the spaces API request can come back with enough schema information that the client can dynamically generate the ember data models it will need to represent the cards as models.
@ef4 Ah, I totally overlooked that, thank you.
So the implementation should be extending what we currently have in the
/permissions
response by areadable-fields
attribute that lists all the readable fields (just like we currently do forwritable-fields
). If a field is not inreadable-fields
we shouldn’t even render it.