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

Rename file and other actions are shown when a user has no permission #178

Open
4 tasks
jelly opened this issue Jan 17, 2024 · 8 comments
Open
4 tasks

Rename file and other actions are shown when a user has no permission #178

jelly opened this issue Jan 17, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@jelly
Copy link
Member

jelly commented Jan 17, 2024

When a non-admin logs in, it has the option to change permissions, rename a file, etc. for files it has no ownership over.

Some notable examples:

  • create link
  • rename
  • move
  • change permissions
@jelly jelly added the bug Something isn't working label Jan 17, 2024
@Abdelra6
Copy link

@jelly I need help in knowing if a user is logged in as admin or not?

@jelly
Copy link
Member Author

jelly commented Jan 22, 2024

See cockpit's use of superuser for detecting if the user is admin, however we really need to check the user object.

@Abdelra6
Copy link

superuser.allowed doesn't change from null to anything after I turn on administrative access

@jelly
Copy link
Member Author

jelly commented Jan 23, 2024

superuser.allowed doesn't change from null to anything after I turn on administrative access

See the privileged button in Cockpit, it listens for superuser changes https://github.com/cockpit-project/cockpit/blob/37fe4a43656013f3a907a4633a18ece447c7e1e7/pkg/lib/cockpit-components-privileged.jsx#L55

@Abdelra6
Copy link

First task is done. Should I push them one by one or all at once?
Screencast from 2024-01-26 03-20-23.webm

@jelly
Copy link
Member Author

jelly commented Jan 26, 2024

@Abdelra6 yes, small PR's are appreciated

@Abdelra6
Copy link

@jelly what do you mean by move? and "edit properties" is the one responsible for changing permissions?

@jelly
Copy link
Member Author

jelly commented Jan 26, 2024

@jelly what do you mean by move? and "edit properties" is the one responsible for changing permissions?

I guess move does not exists yet. But copy, basically all actions need to be checked. But please start with a small PR for one of the scenario's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants