feat(systemtags): add setting to block non admin to create system tags#49514
Merged
feat(systemtags): add setting to block non admin to create system tags#49514
Conversation
d561ba1 to
7ed6833
Compare
7ed6833 to
c158e06
Compare
8c7bd05 to
06bb2f1
Compare
e27715d to
d8d3c7e
Compare
Contributor
5b049ce to
5cf90d5
Compare
5cf90d5 to
f7e6dc9
Compare
sorbaugh
approved these changes
Jan 13, 2025
provokateurin
approved these changes
Jan 13, 2025
Member
provokateurin
left a comment
There was a problem hiding this comment.
Only minor things, LGTM
f7e6dc9 to
001ec5a
Compare
69f8d5e to
76ad5e2
Compare
76ad5e2 to
2df437f
Compare
Contributor
|
/compile |
2fcd63f to
4840a06
Compare
4840a06 to
dc9f724
Compare
b7a29e3 to
ff81fb9
Compare
Merged
ff81fb9 to
a0b0ea3
Compare
Contributor
|
/compile |
artonge
reviewed
Jan 21, 2025
Contributor
artonge
left a comment
There was a problem hiding this comment.
Nitpicking on the naming. But not blocking :)
cd5a4a8 to
7c4295c
Compare
Collaborator
Author
|
/compile |
artonge
approved these changes
Jan 21, 2025
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>
543c295 to
abf840b
Compare
Contributor
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
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