Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dont display fields that are not readable in the right edge

See original GitHub issue

In 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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

ef4commented, Jan 15, 2019

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 a fields 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.

balinterdicommented, Jan 15, 2019

@ef4 Ah, I totally overlooked that, thank you.

So the implementation should be extending what we currently have in the /permissions response by a readable-fields attribute that lists all the readable fields (just like we currently do for writable-fields). If a field is not in readable-fields we shouldn’t even render it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found