Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "hide file list" option #19

Merged
merged 11 commits into from
Jun 10, 2016
Merged

add "hide file list" option #19

merged 11 commits into from
Jun 10, 2016

Conversation

schiessle
Copy link
Member

@schiessle schiessle commented Jun 7, 2016

Add a option for public link shares to hide the file list if "can edit" is enabled. This allows to distribute public links to allow people to upload some files without seeing the content of the folder.

fix #4

@schiessle schiessle added this to the Nextcloud 9 milestone Jun 7, 2016
@LukasReschke
Copy link
Member

  • Access via /public.php/webdav still works if you use the sharing token as username and an empty password.
  • Download of files via download route still works.

Guess we need some further backend changes as well :-)

@jancborchardt jancborchardt added enhancement design Design, UI, UX, etc. labels Jun 7, 2016
@juliushaertl
Copy link
Member

juliushaertl commented Jun 7, 2016

We should also discuss how to handle file name conflicts.

The currently used file conflict popover is not an option, as it enables any public uploader to override existing files and leaks information about data inside the shared folder. In my oppinion adding a number to the file is sufficient, but this should be enforced by default for file drop.

@jancborchardt
Copy link
Member

@juliushaertl good point! An automatic adding of a number in parentheses behind the filename, starting with (2) would be good. cc @schiessle

@MorrisJobke
Copy link
Member

Unit tests are failing … 🙈

@schiessle schiessle force-pushed the files-drop branch 3 times, most recently from 36aec5c to 6d96ec4 Compare June 8, 2016 13:00
@schiessle
Copy link
Member Author

Guess we need some further backend changes as well :-)

added a check to the public webdav back-end

@LukasReschke LukasReschke self-assigned this Jun 8, 2016
@MorrisJobke
Copy link
Member

Unit tests are failing:

There was 1 failure:

1) OCA\Files_Sharing\Tests\Controllers\ShareControllerTest::testDownloadShare
OCP\AppFramework\Http\DataResponse Object &0000000005b7e71900000000540b5d39 (
    'data' => 'Share is read-only'
    'headers' => Array &0 (
        'Cache-Control' => 'no-cache, must-revalidate'
        'Content-Security-Policy' => 'default-src 'none';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self''
    )
    'cookies' => Array &0
    'status' => 200
    'lastModified' => null
    'ETag' => null
    'contentSecurityPolicy' => OCP\AppFramework\Http\ContentSecurityPolicy Object &0000000005b7e48800000000540b5d39 (
        'inlineScriptAllowed' => false
        'evalScriptAllowed' => true
        'allowedScriptDomains' => Array &1 (
            0 => ''self''
        )
        'inlineStyleAllowed' => true
        'allowedStyleDomains' => Array &1
        'allowedImageDomains' => Array &1
        'allowedConnectDomains' => Array &1
        'allowedMediaDomains' => Array &1
        'allowedObjectDomains' => Array &1
        'allowedFrameDomains' => Array &1
        'allowedFontDomains' => Array &1
        'allowedChildSrcDomains' => Array &1
    )
) is not instance of expected class "OCP\AppFramework\Http\RedirectResponse".
--- Expected
+++ Actual
@@ @@
-OCP\AppFramework\Http\RedirectResponse Object &0000000005b7e65f00000000540b5d39 (
-    'redirectURL' => 'redirect'
+OCP\AppFramework\Http\DataResponse Object &0000000005b7e71900000000540b5d39 (
+    'data' => 'Share is read-only'
     'headers' => Array &0 (
         'Cache-Control' => 'no-cache, must-revalidate'
-        'Location' => 'redirect'
+        'Content-Security-Policy' => 'default-src 'none';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self''
     )
     'cookies' => Array &0
-    'status' => 303
+    'status' => 200
     'lastModified' => null
     'ETag' => null
-    'contentSecurityPolicy' => null
+    'contentSecurityPolicy' => OCP\AppFramework\Http\ContentSecurityPolicy Object &0000000005b7e48800000000540b5d39 (
+        'inlineScriptAllowed' => false
+        'evalScriptAllowed' => true
+        'allowedScriptDomains' => Array &1 (
+            0 => ''self''
+        )
+        'inlineStyleAllowed' => true
+        'allowedStyleDomains' => Array &1
+        'allowedImageDomains' => Array &1
+        'allowedConnectDomains' => Array &1
+        'allowedMediaDomains' => Array &1
+        'allowedObjectDomains' => Array &1
+        'allowedFrameDomains' => Array &1
+        'allowedFontDomains' => Array &1
+        'allowedChildSrcDomains' => Array &1
+    )
 )

/drone/src/github.com/nextcloud/server/apps/files_sharing/tests/Controllers/ShareControllerTest.php:454

@LukasReschke
Copy link
Member

@MorrisJobke Yes. We know 😉

@LukasReschke
Copy link
Member

There we go:

2016-06-09_18-14-25

… now just the tests 🙈

@LukasReschke
Copy link
Member

@nextcloud/designers Check it out! Just create a public shared folder, and mark it as "writable" and then click on the "read only" checkbox. @jancborchardt and @schiessle and me came up with this layout and think it is quite nicely 🎉

@Bevito Bevito mentioned this pull request Oct 12, 2022
9 tasks
@nowatbuer nowatbuer mentioned this pull request Jan 18, 2023
9 tasks
alpapan added a commit to alpapan/nextcloud-server that referenced this pull request Feb 7, 2024
fixes this error caused when system has usernames that are purely numeric.

An unhandled exception has been thrown:
Error: Object of class OCA\User_LDAP\User\User could not be converted to string in /var/www/nextcloud/apps/user_ldap/lib/User_LDAP.php:312
Stack trace:
#0 [internal function]: OCA\User_LDAP\User_LDAP->userExistsOnLDAP()
nextcloud#1 /var/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(126): call_user_func_array()
nextcloud#2 /var/www/nextcloud/apps/user_ldap/lib/Proxy.php(140): OCA\User_LDAP\User_Proxy->walkBackends()
nextcloud#3 /var/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(262): OCA\User_LDAP\Proxy->handleRequest()
nextcloud#4 /var/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(239): OCA\User_LDAP\User_Proxy->userExistsOnLDAP()
nextcloud#5 /var/www/nextcloud/lib/private/User/Manager.php(168): OCA\User_LDAP\User_Proxy->userExists()
nextcloud#6 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(399): OC\User\Manager->get()
nextcloud#7 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(226): OCA\Files_FullTextSearch\Service\FilesService->initFileSystems()
nextcloud#8 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(246): OCA\Files_FullTextSearch\Service\FilesService->getChunksFromUser()
nextcloud#9 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(174): OCA\Files_FullTextSearch\Provider\FilesProvider->generateChunks()
nextcloud#10 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(403): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser()
nextcloud#11 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(280): OCA\FullTextSearch\Command\Index->indexProvider()
nextcloud#12 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\FullTextSearch\Command\Index->execute()
nextcloud#13 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
nextcloud#14 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
nextcloud#15 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
nextcloud#16 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
nextcloud#17 /var/www/nextcloud/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run()
nextcloud#18 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
nextcloud#19 /var/www/nextcloud/occ(11): require_once('...')
nextcloud#20 {main}roopico /var/www/nextcloud/apps/user_ldap/lib/User/OfflineUser.phparch:index


Signed-off-by: Alexie Papanicolaou <alpapan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File requests / Files Drop for the community
9 participants