aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller
Commit message (Collapse)AuthorAgeFilesLines
...
| * display shares to circles moderatorMaxence Lange2018-11-021-0/+22
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
| * shares are displayed to users with resharing rightsMaxence Lange2018-11-021-0/+38
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | Add sending the password by Talk for a link share to ShareAPIControllerDaniel Calviño Sánchez2018-11-021-0/+20
|/ | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* allow to update lables for public link sharesBjoern Schiessle2018-11-011-1/+15
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* allow to add labels to sharesBjoern Schiessle2018-11-011-5/+13
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* allow to create multiple link shares via share apiBjoern Schiessle2018-10-311-9/+0
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Honour "hide download" in the public share pageDaniel Calviño Sánchez2018-10-301-6/+8
| | | | | | | | | | | | | When the "hide download" property of a share is set the public share page will not show the download button nor the menu with the download, direct link and "Add to your Nextcloud" actions; the "downloadURL" hidden field will not be included either in the generated HTML. Despite that, note that the "downloadURL" parameter is still set and passed to the template, as this could be needed anyway to generate previews (for example, of audio files). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Expose hide download to public pageRoeland Jago Douma2018-10-301-0/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Propegate hide download state in share providerRoeland Jago Douma2018-10-301-2/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge branch 'master' of https://github.com/nextcloud/server into gridview-tableJohn Molakvoæ (skjnldsv)2018-10-231-2/+21
|\ | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Use lax CSP when the share is a talk shareJoas Schilling2018-10-221-2/+21
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Public fixes, request & default to gridJohn Molakvoæ (skjnldsv)2018-10-231-0/+1
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Move files_drop to compiled handlebarsRoeland Jago Douma2018-10-161-0/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use numeric placeholders if there are multiple, so that RTL languages can ↵Joas Schilling2018-10-091-2/+2
| | | | | | operate better Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow userId to be nullRoeland Jago Douma2018-10-041-1/+1
| | | | | | | | | | | | Fixes #10852 A quick hack. Still ensures some type safety however now also accepts null. Else we'd need to add a whole new layer of middlewares. This can only happen when a guest user wants to access a controller that requries the user_id. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move to 1 template file for filesRoeland Jago Douma2018-10-011-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Compile filesummary handlebarsRoeland Jago Douma2018-09-271-0/+2
| | | | | | | | | | Fixes #11030 For https://github.com/orgs/nextcloud/projects/18 This template is now compiled so this no longer has to happen in the browser. Another step towards a stricter CSP. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #10838 from nextcloud/header-fixes-and-public-noteMorris Jobke2018-08-241-0/+1
|\ | | | | Header fixes and public note
| * Fix mobile view and add public share note viewJohn Molakvoæ (skjnldsv)2018-08-241-0/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Add rooms in the default candidate types to look for when sharingDaniel Calviño Sánchez2018-08-241-0/+6
|/ | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #10255 from nextcloud/add-support-for-room-sharesBjörn Schießle2018-08-092-9/+118
|\ | | | | Add support for room shares
| * Suppress Phan warnings about calling undeclared class methodsDaniel Calviño Sánchez2018-08-082-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DeletedShareAPIController and ShareAPIController helpers for room shares are defined in Talk, so the classes do not exist when Talk is not installed. Due to this when the object returned by "getRoomShareHelper" is used Phan complains that the class is not declared. This is not a problem, though, because when the class is not available "getRoomShareHelper" throws an exception, which is then caught where that method was called. Therefore now those warnings from Phan are suppressed (it would be better to use "@phan-suppress-next-line" instead, but it is not yet available in our Phan version). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add support for room shares to DeletedShareAPIControllerDaniel Calviño Sánchez2018-08-081-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the DeletedShareAPIController requires explicit handling of each type of share (for example, to format a share for a DataResponse). Room shares are implemented in an external app (Nextcloud Talk), so in order to keep the controller as isolated as possible from room share specifics all that explicit handling is done in a helper class provided by the Talk app. In other cases it is just enough to call the share manager specifying a room share type; note that the share manager is guarded against share types for which there is no provider, so it is not necessary to explicitly check that before passing room shares to the share manager. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add support for room shares to ShareAPIControllerDaniel Calviño Sánchez2018-08-081-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the ShareAPIController requires explicit handling of each type of share (for example, to format a share for a DataResponse). Room shares are implemented in an external app (Nextcloud Talk), so in order to keep the controller as isolated as possible from room share specifics all that explicit handling is done in a helper class provided by the Talk app. In other cases it is just enough to call the share manager specifying a room share type; note that the share manager is guarded against share types for which there is no provider, so it is not necessary to explicitly check that before passing room shares to the share manager. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix multiSelectMenu for public shares #10536MartB2018-08-061-0/+1
|/ | | | Signed-off-by: Martin Böh (MartB) <mart.b@outlook.de>
* Add event to load additional scripts in the auth page for public sharesDaniel Calviño Sánchez2018-07-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | Before the public share authentication page is rendered now an event to load additional scripts is dispatched. Thanks to this any app can load its own scripts that, when run on the browser, adjust as needed the page generated by the server. Note, however, that during the handling of the event apps are only able to add scripts or styles to be loaded; they can not render arbitrary content on the page, or change how the content is rendered by the original template; all those changes have to be done by the scripts at run-time. This implies that the scripts of the apps can use only those parameters, like the token of the share, added to the page when it is generated by the "publicshareauth" template. Due to this, and given that the event is being introduced to be used by Talk to inject the UI needed to request the password for a share, the token of the share is now provided in the generated page, just like done in the public share page. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add support for sending the password by Talk to ShareAPIControllerDaniel Calviño Sánchez2018-07-241-2/+31
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* return the as well note if we fetch a shareBjoern Schiessle2018-07-211-0/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* show note on public link pageBjoern Schiessle2018-07-211-0/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* allow to add a personal note to a shareBjoern Schiessle2018-07-211-3/+11
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Merge pull request #5280 from nextcloud/shared-with-display-nameMorris Jobke2018-07-131-2/+7
|\ | | | | sharedWithDisplayName & sharedWithAvatar
| * SharedWithDisplayName + SharedWithAvatarMaxence Lange2018-05-211-2/+7
| | | | | | | | | | Signed-off-by: Maxence Lange <maxence@nextcloud.com> Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix formatting of email and circle sharesDaniel Calviño Sánchez2018-07-121-1/+1
| | | | | | | | | | | | | | | | Due to a misplaced "||" instead of "===" the condition was always met, so every share type in the conditional chain after the remote and remote group shares was formatted as a remote/remote group share. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | update unit testsBjoern Schiessle2018-07-111-1/+7
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | start to get fed group shares into the share dialogBjoern Schiessle2018-07-111-0/+10
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | implement federated group sharesBjoern Schiessle2018-07-111-40/+53
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Fix exceptionRoeland Jago Douma2018-07-051-0/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Disable sidebar on deleted shareJohn Molakvoæ (skjnldsv)2018-07-051-1/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Js magic for deleted sharesJohn Molakvoæ (skjnldsv)2018-07-052-5/+62
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | getDeletedSharedWith methodJohn Molakvoæ (skjnldsv)2018-07-051-11/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Add API to undelete delete group sharesRoeland Jago Douma2018-07-051-0/+119
| | | | | | | | | | | | | | | | | | | | | | When a group share is deleted we keep track of this in the DB. Right now it is only possible for a recipient to get back the share by asking the sharer to delete it and to share it again. This doesn't scale. This endpoint makes it possible to get back the share. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix getting the information of group share as a shareeDaniel Calviño Sánchez2018-06-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the receiver of a group share modifies it (for example, by moving it to a different folder) the original share is not modified, but a "ghost" share that keeps track of the changes made by that specific user is used instead. By default, the method "getShareById" in the share provider returns the share from the point of view of the sharer, but it can be used too to get the share from the point of view of a sharee by providing the "recipient" parameter (and if the sharee is not found then the share is returned from the point of view of the sharer). The "ShareAPIController" always formats the share from the point of view of the current user, but when getting the information of a specific share the "recipient" parameter was not given, so it was always returned from the point of view of the sharer, even if the current user was a sharee. Now the "recipient" parameter is set to the current user, and thus the information of the share is returned from the point of view of the current user, be it the sharer or a sharee. Note that this special behaviour of "getShareById" happens only with group shares; with other types of shares the share is the same for the sharer and the sharee, and thus the parameter is ignored; it was added for them too just for consistency. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix ShareControllerTestRoeland Jago Douma2018-06-201-32/+7
| | | | | | | | | | | | | | * Removed tests that are now handled by the middleware * Updated tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Move public auth page overRoeland Jago Douma2018-06-201-17/+0
| | | | | | | | | | | | | | Now this is in core so the basics (that 99% of the app will want to use) looks always the same. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Move public preview endpoint overRoeland Jago Douma2018-06-202-11/+35
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Quick hack to make the files sharing app work with this properlyRoeland Jago Douma2018-06-201-84/+57
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Allow updating the token on session regenerationRoeland Jago Douma2018-06-141-1/+1
| | | | | | | | | | | | | | Sometimes when we force a session regeneration we want to update the current token for this session. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Regenerate session id after public share authRoeland Jago Douma2018-05-171-0/+1
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #9284 from nextcloud/bugfix/9279/strict_sharee_apiMorris Jobke2018-04-251-5/+6
|\ | | | | Make ShareesAPIController strict
| * Make ShareesAPIController strictRoeland Jago Douma2018-04-231-5/+6
| | | | | | | | | | | | Fixes #9279 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>