feat(systemtags): add setting to block non admin to create system tags#49514
Merged
Conversation
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
4 times, most recently
from
November 28, 2024 12:36
d561ba1 to
7ed6833
Compare
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
from
December 9, 2024 09:23
7ed6833 to
c158e06
Compare
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
3 times, most recently
from
December 20, 2024 12:04
8c7bd05 to
06bb2f1
Compare
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
2 times, most recently
from
January 2, 2025 14:55
e27715d to
d8d3c7e
Compare
Contributor
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
3 times, most recently
from
January 13, 2025 14:12
5b049ce to
5cf90d5
Compare
nfebe
marked this pull request as ready for review
January 13, 2025 14:15
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
from
January 13, 2025 14:51
5cf90d5 to
f7e6dc9
Compare
nfebe
requested review from
Pytal,
artonge,
come-nc,
provokateurin and
skjnldsv
January 13, 2025 14:54
sorbaugh
approved these changes
Jan 13, 2025
provokateurin
approved these changes
Jan 13, 2025
provokateurin
left a comment
Member
There was a problem hiding this comment.
Only minor things, LGTM
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
from
January 14, 2025 08:52
f7e6dc9 to
001ec5a
Compare
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
2 times, most recently
from
January 17, 2025 14:43
69f8d5e to
76ad5e2
Compare
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
from
January 18, 2025 22:11
76ad5e2 to
2df437f
Compare
Contributor
|
/compile |
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
from
January 20, 2025 11:59
2fcd63f to
4840a06
Compare
Altahrim
enabled auto-merge
January 20, 2025 11:59
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
from
January 20, 2025 12:07
4840a06 to
dc9f724
Compare
nextcloud-command
force-pushed
the
feat/restrict-tag-creation
branch
from
January 20, 2025 19:27
b7a29e3 to
ff81fb9
Compare
Merged
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
from
January 21, 2025 09:34
ff81fb9 to
a0b0ea3
Compare
Contributor
|
/compile |
artonge
reviewed
Jan 21, 2025
artonge
left a comment
Collaborator
There was a problem hiding this comment.
Nitpicking on the naming. But not blocking :)
Altahrim
force-pushed
the
feat/restrict-tag-creation
branch
from
January 21, 2025 13:26
cd5a4a8 to
7c4295c
Compare
Collaborator
Author
|
/compile |
artonge
approved these changes
Jan 21, 2025
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
from
January 22, 2025 19:01
55cb8bb to
b18f4d7
Compare
Contributor
|
/compile |
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Added support for the `only_admin_can_create` flag in system tags. The UI now hides the option to create tags when this flag is enabled, ensuring compliance with admin settings. Signed-off-by: nfebe <fenn25.fn@gmail.com>
nfebe
force-pushed
the
feat/restrict-tag-creation
branch
from
January 22, 2025 19:13
543c295 to
abf840b
Compare
Contributor
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Merged
9 tasks
skjnldsv
reviewed
Mar 5, 2025
| $this->initialStateService->provideInitialState('profileEnabledByDefault', $this->isProfileEnabledByDefault($this->config)); | ||
|
|
||
| // Basic settings | ||
| $this->initialStateService->provideInitialState('restrictSystemTagsCreationToAdmin', $this->appConfig->getValueString('systemtags', 'restrict_creation_to_admin', 'true')); |
Member
There was a problem hiding this comment.
The value is NOT stored as a boolean in the backend, but as an integer @Altahrim

skjnldsv
reviewed
Mar 5, 2025
Comment on lines
+40
to
+42
| if (loadState('settings', 'restrictSystemTagsCreationToAdmin', '0') === '1' && getCurrentUser()?.isAdmin !== true) { | ||
| return false | ||
| } |
Member
There was a problem hiding this comment.
@nfebe why are we preventing the entire bulk tagging action if creation is disabled?
It does NOT mean we cannot apply tags....
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Allows admins to restrict tag creation to admins only
Switch with:
TODO
Checklist