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

Fixing permissions access #215

Closed
wants to merge 1 commit into from

Conversation

Abdelra6
Copy link

This PR aims to fix #178

@Abdelra6 Abdelra6 reopened this Jan 26, 2024
@Abdelra6 Abdelra6 marked this pull request as draft January 26, 2024 17:25
{ type: "divider" },
{ title: cockpit.format(_("Delete")), onClick: _deleteItem, className: "pf-m-danger" },
])
: superuser.allowed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work, this needs to deal with UNIX permissions from the selected file. More details for example here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly doesn't work? Did I misunderstand the issue or implemented it wrongly?
I hid create link while in "limited access" mode

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code needs to look at the current file permissions and the current logged in user, not if they are sudo or not.

I can only recommend researching how UNIX file permissions work in general https://linuxize.com/post/understanding-linux-file-permissions/

Copy link
Author

@Abdelra6 Abdelra6 Jan 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha So every file should be worked on independently?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, every file needs to be checked independent.

@jelly
Copy link
Member

jelly commented May 22, 2024

This has gone out of sync for a while now, closing.

@jelly jelly closed this May 22, 2024
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.

Rename file and other actions are shown when a user has no permission
2 participants