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

Adding support for multiple users with different access rights and Text Editor. #331

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

nickivnv
Copy link

@nickivnv nickivnv commented Mar 18, 2022

This is a bugfix regarding visualization of broken symlinks.
In case of broken symbolic link (missing target) ist thrown exception which leads to misbehavior during displaying of affected folder.

nickiv69 and others added 9 commits March 18, 2022 14:27
…n the whole folder was not displayed on the client.
…g, support only one language - usually LANG=en_US(utf8 encoding),

then the file names which are ANSI encoded with characters like - ü,ä,ö are not displayed (including all items in the current folder).
This fix make them visible, but not processable (rename, delete, etc.).
Now the http requests to file API have the Same-origin as client URL.
Necessary for correct handling of cookie sessions in development environment.
  66 passing (540ms)
  4 failing

  1) Search for files/dirs Various fileContentSubstring Case-insensitive content search by default:
     AssertionError: expected [] to have the same members as [ 'gpl.pdf', 'hello-world.js' ]
      at api-tests/api-tests.spec.js:527:66
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  2) Search for files/dirs Various fileContentSubstring Case-insensitive content search:
     AssertionError: expected [] to have the same members as [ 'gpl.pdf', 'hello-world.js' ]
      at api-tests/api-tests.spec.js:551:66
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  3) Search for files/dirs Various fileContentSubstring Case-insensitive content + filename search:
     AssertionError: expected [] to have the same members as [ 'hello-world.js' ]
      at api-tests/api-tests.spec.js:576:66
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  4) Search for files/dirs Various fileContentSubstring Case-sensitive content search:
     AssertionError: expected [] to have the same members as [ 'gpl.pdf' ]
      at api-tests/api-tests.spec.js:595:66
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 Solution was to rewrite "async _transform(file, encoding, done)" function to synchronous one.
…n' support to the nodejs server.

Test cases are added for signin/signout requests.
This are only server changes, client changes will follow.
@nickivnv nickivnv marked this pull request as draft April 8, 2022 12:24
@nickivnv nickivnv marked this pull request as ready for review April 8, 2022 12:25
@nickivnv nickivnv changed the title Fixed broken symbolic links visualisation. If symbolic link was broke… New feature: Adding users support with different access rights and some bug fixes. Apr 8, 2022
@baur
Copy link

baur commented Jul 29, 2022

Is it possible to enable access to folders by list:

case1
access = {user: 'login1', access: [{folder: 'root'}], type: 'read'}

case2
access = {user: 'login2', access: [{folder: 'root\folder1'}, {folder: 'root\folder2\subfolder3'}], type: 'write'}

user can access various folders

@baur
Copy link

baur commented Jul 29, 2022

It would be nice if add JWT authorization capability

Thank you for PR. can you publish it to npm if the authors will not merge this PR?

@nickivnv
Copy link
Author

Is it possible to enable access to folders by list:

case1 access = {user: 'login1', access: [{folder: 'root'}], type: 'read'}

case2 access = {user: 'login2', access: [{folder: 'root\folder1'}, {folder: 'root\folder2\subfolder3'}], type: 'write'}

user can access various folders

For sure it can be done. It is open source do it yourself.

@baur
Copy link

baur commented Aug 2, 2022

For sure it can be done. It is open source do it yourself.

@nickivnv
@estambakio-sc

Sure, I'll try, though I'm not at that level. But for this requires to merge this PR

@baur
Copy link

baur commented Aug 2, 2022

Package init error

npm install
error ->

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> postinstall
> npm run bootstrap

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> bootstrap
> lerna bootstrap

lerna info version 2.8.0
lerna info Bootstrapping 5 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm install
lerna ERR! npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
lerna ERR! npm ERR! code ERESOLVE
lerna ERR! npm ERR! ERESOLVE unable to resolve dependency tree
lerna ERR! npm ERR!
lerna ERR! npm ERR! While resolving: undefined@undefined
lerna ERR! npm ERR! Found: [email protected]
lerna ERR! npm ERR! node_modules/react
lerna ERR! npm ERR!   react@"16.2.0" from the root project
lerna ERR! npm ERR!
lerna ERR! npm ERR! Could not resolve dependency:
lerna ERR! npm ERR! peer react@"0.13.x || 0.14.x || ^15.0.0-0 || 15.x" from [email protected]
lerna ERR! npm ERR! node_modules/enzyme
lerna ERR! npm ERR!   enzyme@"2.9.1" from the root project
lerna ERR! npm ERR!   peer enzyme@"1.x || 2.x" from [email protected]
lerna ERR! npm ERR!   node_modules/chai-enzyme
lerna ERR! npm ERR!     chai-enzyme@"0.6.1" from the root project
lerna ERR! npm ERR!
lerna ERR! npm ERR! Fix the upstream dependency conflict, or retry
lerna ERR! npm ERR! this command with --force, or --legacy-peer-deps
lerna ERR! npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
lerna ERR! npm ERR!
lerna ERR! npm ERR! See C:\Users\admin\AppData\Local\npm-cache\eresolve-report.txt for a full report.

@nickivnv
Copy link
Author

nickivnv commented Aug 2, 2022 via email

@baur
Copy link

baur commented Aug 2, 2022

ok, thank you ...

@baur
Copy link

baur commented Aug 2, 2022

I got the next error:

filemanager\packages\client-react>npm run build

error ->

npm WARN     dev webpack-cli@"*" from the root project
npm WARN     1 more (@webpack-cli/configtest)
[#######...........] \ idealTree:yargs: timing idealTree:node_modules/yargs Completed in 26ms                           [#######...........] | idealTree:serve-static: timing idealTree:node_modules/@opuscapita/opuscapita-ui/node_modules/serv[#######...........] - idealTree:serve-static: timing idealTree:node_modules/@opuscapita/opuscapita-ui/node_modules/serv[########..........] - idealTree:is-number: timing idealTree:node_modules/has-values/node_modules/is-number Completed in[########..........] \ idealTree:style-loader: timing idealTree:node_modules/size-limit/node_modules/style-loader Completed in 0ms                                                                               [########..........] | idealTree:webpack-bundle-analyzer: timing idealTree:node_modules/size-limit/node_modules/webpack-bundle-analyzer Completed inpm ERR! code ETARGET
npm ERR! notarget No matching version found for @opuscapita/[email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:

@nickivnv
Copy link
Author

nickivnv commented Aug 2, 2022 via email

@baur
Copy link

baur commented Aug 2, 2022

client-react builds with warns

filemanager\packages\client-react>npm run build --force
npm WARN using --force Recommended protections disabled.

> @baur/[email protected] build
> rimraf lib && cross-env NODE_ENV=production webpack --config ./config/webpack.config.js --hide-modules

(node:117808) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
(Use `node --trace-deprecation ...` to show where the warning was created)
Build completed in 4.379s

Hash: 73bf78b0a35ad421d180
Version: webpack 2.2.1
Time: 4381ms
   Asset     Size  Chunks                    Chunk Names
index.js  1.09 MB       0  [emitted]  [big]  main

WARNING in EnvironmentPlugin - HOST environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - PORT environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - SERVER_URL environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - CLIENT_ID environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - API_KEY environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

npm published without error

but after install to project some packages lacks.
image
also svg-icons not istallded

React client Project error ->

Uncaught TypeError: Cannot read properties of undefined (reading 'SERVER_URL')
    at Object.<anonymous> (index.js:14412:1)
    at __nested_webpack_require_797__ (index.js:30:1)
    at Object.<anonymous> (index.js:14567:1)
    at __nested_webpack_require_797__ (index.js:30:1)
    at Object.<anonymous> (index.js:9669:1)
    at __nested_webpack_require_797__ (index.js:30:1)
    at Object.<anonymous> (index.js:32266:1)
    at __nested_webpack_require_797__ (index.js:30:1)
    at index.js:76:1
    at index.js:11:1

Please, publish on NPM, I'd like to test your version

@baur
Copy link

baur commented Aug 9, 2022

Hi, @estambakio-sc
Maybe grant write access on this project to @nickivnv

@nickivnv nickivnv changed the title New feature: Adding users support with different access rights and some bug fixes. New features: Adding users support with different access rights and Text Editor Dec 10, 2022
@nickivnv nickivnv changed the title New features: Adding users support with different access rights and Text Editor Adding support for multiple users with different access rights and Text Editor. Dec 10, 2022
@baur
Copy link

baur commented Dec 28, 2022

I can't build by your source code, Please, can you pack it to the docker image with node connector?

@nickivnv
Copy link
Author

nickivnv commented Jan 2, 2023 via email

@baur
Copy link

baur commented Jan 2, 2023

This is my local copy of the filemanager with all changes necessary to get it running: https://drive.google.com/file/d/12o-9A8RbdcdzYFAfkMEPOcXFlURHy3fH/view?usp=share_link

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants