No category-field should be visible if the user doesnt have permissions to see any of the categories in it #2455
Labels
Codebase: Client
Indicates issue work will be in client
good-first-issue
Issues that are ideal for first time contributors to OSS or first time contributing to the platform
Hacktoberfest
Issues open to folks participating in hacktoberfest
Theme: Categories
Theme: Forms
Current behaviour
If a user tries to add to a survey with a category-field where there are no categories visible for that user, the field-heading + a select-all option is visible
Steps to reproduce the behaviour/error
Expected behaviour
If a user tries to add to a survey with a category-field where there are no categories visible for that user, the field should not be visible at all.
Fixing this issue
I think checking if categories.length is >0 in the first div of app/common/directives/category-selector.html should fix this issue, but I haven't tried it.
Implementation notes
Fix in https://github.com/ushahidi/platform-client repo
Hint 💡 The code handling the category selector can be found here: https://github.com/ushahidi/platform-client/tree/develop/app/common/directives/category-selector.html
When you are done, 🔀 Start a Pull Request. There are two ways how you can start a pull request:
If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
You can also edit files directly in your browser and open a pull request from there.
🏁 When done Ask in comments for a review :)
Want to work on this issue?🙋
Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!
Ping @rowasc if you need help with this issue!
The text was updated successfully, but these errors were encountered: