Skip to content

Conversation

@enjeck
Copy link
Contributor

@enjeck enjeck commented Dec 28, 2025

part of #67

TODO

blizzz and others added 3 commits December 20, 2025 01:37
- modifies oc_tables_share structure with two columns, token and password
- adds ShareOCSController with a route to create link shares
- adds a PageController front route to display the link share
- adds a ApiPublicColumnsController to retrieve columns for public
  links. It was not added to the existing ApiColumnsController, as it
  requires the userId of the logged-in user and I did not want to weaken
  this detail.
- adds an abstract controller for columns with shared functionality and
  make ApiColumnsController extend it.
- adds a PublicRowOCSController for retrieving rows through link shares
- adds a ShareToken value object
- adds a ShareControlMiddleware for share token and existance
  validation. It comes with the AssertShareToken attribute.
- extends Share entity with ShareToken and Password properties
- extends ShareMapper to find a share by the share token
- extends ShareService with a method to easily create link shares
- extends ResponseDefinitions with TablesPublicRow and
  TablesPublicColumn specs. Essentially tableIDs are not exposed and
  also user ids in lastEditBy and createdBy are not disclosed.
- extends RowService and ColumnService with methods to return such ^
  formatted result arrays.
- extends OpenAPI spec

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
@enjeck enjeck self-assigned this Dec 28, 2025
@enjeck enjeck requested a review from blizzz as a code owner December 28, 2025 07:23
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Dec 28, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for displaying both views and tables, despite the name. I should probably rename view to element

Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
@enjeck enjeck force-pushed the enh/noid/link-share-biz branch from 9f86cfc to 6cc82e6 Compare December 29, 2025 16:16
@enjeck enjeck requested a review from juliusknorr December 30, 2025 08:33
);
}

Util::addScript(Application::APP_ID, 'tables-main');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try using addStyle here to have custom styles, instead of the inline styles in error.php

return !!this.shareToken
},
shareToken() {
return loadState('tables', 'shareToken', false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loadState is not reactive so this does not need to be a computed property but can just go to data

To prepare for more advanced navigation on public pages, we could also use the token from the vue-router route, but may be a step to far already

<div v-if="usePassword" class="sharing-entry-link__form-row">
<NcActionInput
:value.sync="password"
type="text"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be rather a type password? I think even in the files app that is not shown in plain text

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went over the code and generally seems good, a few things to address still:

  • We should probably not allow creating a share with a password when the password field is empty
  • Design needs a bit of polishing so that the rows span the full width Image
  • Editing should be blocked, you can currently inline edit, and requests are sent but they fail as expected
  • Set password should probably be not checked by default (aligned with how it works in files)

@juliusknorr juliusknorr added the enhancement New feature or request label Dec 30, 2025
Util::addStyle(Application::APP_ID, 'grid');
Util::addStyle(Application::APP_ID, 'modal');
Util::addStyle(Application::APP_ID, 'tiptap');
Util::addStyle(Application::APP_ID, 'tables-style');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this change but I think "tables-style" is not existent anymore. We can remove this and save a 404 request for a styles file that does not exist anymore. Can be seen in the browser development console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 🧭 Planning evaluation (don't pick)

Development

Successfully merging this pull request may close these issues.

4 participants