Files sidebar: tag creation error ignores the "restrict to admins" setting
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Read apps/systemtags/src/components/SystemTags.vue around the error handling at lines 163–171 and compare it with SystemTagPicker.vue, which the issue names as using the correct state lookup. Update the restriction check and ensure loading is reset in both error branches. Add a test for the error message and loading state, then run the relevant systemtags component tests.
Written by the indexing model from the issue text.
Description
Bug description
When creating a tag in the Files sidebar fails, SystemTags.vue decides on the error message by reading the creation restriction from the initial state of the settings app:
In Files this state is provided by the systemtags app (LoadAdditionalScriptsListener / BeforeTemplateRenderedListener), the settings one only exists on the admin server settings page. So the value is always false here and users always get the generic "Failed to create tag" instead of "System admin disabled tag creation. You can only use existing ones." In addition, the early return in that branch skips loading.value = false, so once the app id is fixed the component would stay in the loading state after this error.
Steps to reproduce
Found by code reading.
- As admin, restrict tag creation to admins.
- As a regular user, try to create a new tag from the Files sidebar.
- "Failed to create tag" is shown.
Expected behavior
The state is read via loadState('systemtags', 'restrictSystemTagsCreationToAdmin', false) (as SystemTagPicker.vue does), the loading state is reset in both branches, and this is covered by a test.
Nextcloud version
master
- Dominant language
- PHP
- Stars
- 37.7k
- Forks
- 5.4k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 585
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/server
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: federation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: files feature: previews and thumbnails
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: dashboard
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: sharing
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
All issues in nextcloud/server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
nhrrob/nhrrob-secure#35 ·
-
area/tests type/bug when/soon
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day