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

Show create folder/file only when a user can create them #789

Open
jelly opened this issue Oct 17, 2024 · 0 comments
Open

Show create folder/file only when a user can create them #789

jelly opened this issue Oct 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jelly
Copy link
Member

jelly commented Oct 17, 2024

This issue is only in limited mode as a administrator can create everything they want. To verify if we can create a file or folder in the current directory we can execute test -w instead of us re-implementing access and the trouble of checking ACL's.

Our options are:

  • on contextmenu and kebab menu, test -w $CWD and cache the results based on current cwdInfo, so hashing it.
  • in app.jsx on fsinfo.change() initially discover if we can write to the directory, if cwdInfo changes re-check.

Both approaches have one big issue, when an admin changes ACL's on a directory we do get an fsinfo change but the state lacks ACL information so cache invalidation would be difficult (as mtime does not change). So fsinfo would have to also encode ACL information in it's state.

@jelly jelly added the enhancement New feature or request label Oct 17, 2024
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
None yet
Development

No branches or pull requests

1 participant