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?)
There was a problem hiding this comment.
I got what you mean, but we open only single column that selected in "Value selection label".
In our organization we have hundreds of dictionary-tables. Imagine what mess can can have our users that will manage tables that rely on this dictionary-tables.
I can add some NcNoteCard with a notice that field will be exposed. WDYT?
There was a problem hiding this comment.
I can add some NcNoteCard with a notice that field will be exposed. WDYT?
okay, for the MVP so we can merge this now, adding this is okay. Thanks!
We've discussed internally some ideas for what the follow-up for this would look like:
- we require that a column that is being referenced is accessible by a table manager.
- when a table ore or view, that contains such a column, is being unshared with someone, we check whether this this column is included in a reference. And then we re-eavluate the situation: check whether the owner or any other manager still has access to that column. If not, disable the relation and show an error.
- check should also happen with ownership transfer and demoting table managers.
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 🙏 |
3240639 to
0cdfefa
Compare
enjeck
left a comment
There was a problem hiding this comment.
would be nice to have tests to avoid regressions in the future
b707106 to
f3c29d8
Compare
|
@Aveyron-RetD here we go, without tooltip
|
f3c29d8 to
b426237
Compare
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
b426237 to
5752ee3
Compare
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>



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: