Conversation
c3f6a2d to
fdd744e
Compare
f792683 to
f599f40
Compare
92af03c to
0f9416b
Compare
6a4e073 to
5209182
Compare
fb98364 to
198afa1
Compare
198afa1 to
ddc1bd1
Compare
f34f8f9 to
d406233
Compare
f092bad to
502b69b
Compare
502b69b to
8093d63
Compare
d45b95c to
cb637bd
Compare
cb637bd to
9b36f43
Compare
enjeck
left a comment
There was a problem hiding this comment.
Thanks, it works quite well already. A few comments for now. I have only tested the creation of columns and rows so far
| $targetColumn = $this->columnMapper->find($settings[Column::RELATION_LABEL_COLUMN]); | ||
| if ($isView) { | ||
| $view = $this->viewMapper->find($targetId); | ||
| $rows = $this->row2Mapper->findAll( | ||
| [$targetColumn->getId()], | ||
| $view->getTableId(), | ||
| null, | ||
| null, | ||
| $view->getFilterArray(), | ||
| $view->getSortArray(), | ||
| $this->userId |
There was a problem hiding this comment.
Do we ever consider permissions such that the user must have access to the table/view before they can link to it?
There was a problem hiding this comment.
No, and this is a "feature by design". The main idea is that admin creates tables for dictionaries, e.g. users, departments, offices, etc, then creates table that references to this dictionaries, e.g. vacations. And he can share only vacations to the end users.
Otherwise he should to share all dictionary tables as well. And users will have tons of irrelevant tables in their shares. Or admin can forget to share dictionary tables and users will suffer because table with relations not displays all columns.
We can't share table partially per column right now. Let's preserve same approach for new column types as well.
There was a problem hiding this comment.
We have to be careful not to leak data. At the moment, suppose Bob shares a table X witih Alice. Then Alice creates a table Y with a column that links to table X. Then Bob later decides to revoke the share from Alice. But Alice is still able to continue reading the linked relation column, despite not having the permission for that. Plus, Alice gets a 403 when they try to edit that column (which is to be expected since they no longer have permissions, but maybe a better error message than Could not load columns. Request not allowed helps?)
7e22314 to
b47617a
Compare
b47617a to
3240639
Compare
|
So I have user tested and this looks good. 👍 Could not get it to work at first because I did not get that only text field were working. This will create maybe some confusion on first use. Not all tables do have this text field. Perhaps a comment with a small tooltip with a little (i) in the screenshot below to explain that you can only link that kind of data For my mention of #2035 this is not a good fit. |
@Aveyron-RetD yeah, I'm aware about that case. But you need to understand me as well: feature is really huge, we should start from something simple and improve it in upcoming iterations 🤝 I will add tooltip soon. Hope that we can merge it soon 🙏 |
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
3240639 to
0cdfefa
Compare
| IsLowerThan: 'is-lower-than', | ||
| IsLowerThanOrEqual: 'is-lower-than-or-equal', | ||
| IsEmpty: 'is-empty', | ||
| IsNotEmpty: 'is-not-empty', |
There was a problem hiding this comment.
Creating a view with this filter doesn't work, as the backend filter needs to modified too
enjeck
left a comment
There was a problem hiding this comment.
would be nice to have tests to avoid regressions in the future

This PR introduces a basic relation type. It allows to connect few tables together. We will store row id as a column value and display selected column as a label for this values. Closes #172.
✔️ Implemented
🔍 Column create/edit
🔍 Row create/edit via popup/inline
🔍 Row display in table/view + handle relation row removal
🔍 Filter for view
🔍 Filter for rows
🔍 Import/Export
🚧 Pending (help welcomed):
❎ What is out of scope: