Ver código fonte

[RAZ] allowing user to go outside home bucket (#2729)

Ayush Goyal 3 anos atrás
pai
commit
efb9ea9d8c

+ 2 - 2
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -2502,8 +2502,8 @@ else:
         skipKeydownEvents: true,
         onEnter: function (el) {
           var target_path = stripHashes(el.val());
-          if (window.USER_HOME_DIR.split('/')[2] !== el.val().split('/')[2] && window.RAZ_IS_ENABLED){
-            $.jHueNotify.warn("${ _('You are not allowed to go outside ') }" + window.USER_HOME_DIR + "${ _(' bucket.') }");
+          if (el.val().split('/')[2] === '' && window.RAZ_IS_ENABLED){
+            $.jHueNotify.warn("${ _('Listing of buckets is not allowed. Redirecting to the home directory.') }");
             target_path = window.USER_HOME_DIR;
           } 
           fileBrowserViewModel.targetPath("${url('filebrowser:filebrowser.views.view', path='')}" + target_path);