Skip to content

Commit

Permalink
Remove recursive chmod support
Browse files Browse the repository at this point in the history
This isn't anything that helps the user in its current state — applying
a numeric mode to all of the files in a subdirectory is either going to
end up breaking all of the files or all of the directories.

Let's bring this back later in a better form.

See cockpit-project#192
  • Loading branch information
allisonkarlitskaya committed Jan 23, 2024
1 parent 9c15b54 commit 54de850
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 1 addition & 4 deletions src/apis/spawnHelpers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,9 @@ export const spawnCreateLink = ({ type, currentPath, originalName, newName, Dial
};

// eslint-disable-next-line max-len
export const spawnEditPermissions = ({ changeAll, ownerAccess, groupAccess, otherAccess, name, path, selected, owner, group, Dialogs, setErrorMessage }) => {
export const spawnEditPermissions = ({ ownerAccess, groupAccess, otherAccess, name, path, selected, owner, group, Dialogs, setErrorMessage }) => {
const command = [
"chmod",
...(changeAll
? ["-R"]
: []),
ownerAccess + groupAccess + otherAccess,
path.join("/") + "/" + selected.name
];
Expand Down
7 changes: 0 additions & 7 deletions src/fileActions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,6 @@ export const EditPermissionsModal = ({ selected, path }) => {
>
{_("Change")}
</Button>
{selected.type === "directory" &&
<Button
variant="secondary"
onClick={() => spawnEditPermissions({ ...options, changeAll: true })}
>
{_("Change permissions for enclosed files")}
</Button>}
<Button variant="link" onClick={Dialogs.close}>{_("Cancel")}</Button>
</>
}
Expand Down

0 comments on commit 54de850

Please sign in to comment.