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

Forbid tagging readonly files #44297

Merged
merged 2 commits into from Mar 21, 2024
Merged

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Mar 19, 2024

Summary

Forbid tagging a readonly file.
For other types that may be supported by systemtags if provided by an application (I do not know of any application actually using that feature), update is always allowed for now.
This should be followed by a PR to give a way for applications to provide a writeaccess function as well, for completeness sake.

Checklist

@come-nc come-nc added the 2. developing Work in progress label Mar 19, 2024
@come-nc come-nc added this to the Nextcloud 29 milestone Mar 19, 2024
@come-nc come-nc self-assigned this Mar 19, 2024
@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable28

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable27

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

(I’m backporting first, I will fix conflicts after because the conflict is only for master branch)

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable26

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable25

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable24

@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

/backport! to stable23

Copy link

backportbot bot commented Mar 19, 2024

The backport to stable23 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable23
git pull origin stable23

# Create the new backport branch
git checkout -b backport/44297/stable23

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 31cd2160 06b5919e

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/44297/stable23

Error: Failed to push branch backport/44297/stable23: fatal: could not read Username for 'https://github.com': No such device or address


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Contributor Author

come-nc commented Mar 19, 2024

Rebased on master and fixed conflicts. Replaced the function content to more modern code to match the other function.

@come-nc come-nc force-pushed the fix/forbid-tagging-readonly-files branch from 06b5919 to c1b451e Compare March 19, 2024 15:02
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 19, 2024
@come-nc come-nc requested review from nickvergessen, a team, ArtificialOwl, artonge and sorbaugh and removed request for a team March 19, 2024 15:03
@@ -75,7 +90,8 @@
$tagMapper,
$userSession,
$groupManager,
$entityExistsFunction
$entityExistsFunction,
fn ($name) => true,

Check notice

Code scanning / Psalm

MissingClosureParamType Note

Parameter $name has no provided type
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@come-nc come-nc added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 21, 2024
@come-nc come-nc merged commit 67b9b34 into master Mar 21, 2024
168 checks passed
@come-nc come-nc deleted the fix/forbid-tagging-readonly-files branch March 21, 2024 10:44
artonge added a commit that referenced this pull request Mar 21, 2024
…files

Forbid tagging readonly files

Signed-off-by: Louis Chemineau <louis@chmn.me>
@Altahrim Altahrim mentioned this pull request Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants