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

No category-field should be visible if the user doesnt have permissions to see any of the categories in it #2455

Closed
Angamanga opened this issue Feb 2, 2018 · 5 comments · Fixed by ushahidi/platform-client#1346 or ushahidi/platform-client#1357
Assignees
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

Comments

@Angamanga
Copy link
Contributor

Angamanga commented Feb 2, 2018

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

Screen Shot 2018-02-01 at 10.05.11.png

Steps to reproduce the behaviour/error

  1. make sure you are logged out try adding a post to a survey with a category-field where all the categories are limited to for example admins
  2. You see the field-heading and the select-all option only.

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

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!

@Erioldoesdesign Erioldoesdesign self-assigned this Mar 31, 2018
@rowasc rowasc added good-first-issue Issues that are ideal for first time contributors to OSS or first time contributing to the platform and removed good-first-issue-after-spec labels Aug 17, 2019
@rowasc rowasc added WSC Codebase: Client Indicates issue work will be in client and removed wsc2019 labels Aug 17, 2019
@rowasc rowasc added the Hacktoberfest Issues open to folks participating in hacktoberfest label Sep 28, 2019
@Guzzler
Copy link

Guzzler commented Oct 7, 2019

I would like to give a shot at this issue. will open a PR soon

@Angamanga
Copy link
Contributor Author

@all-contributors please add @Guzzler for code

@allcontributors
Copy link
Contributor

@Angamanga

I've put up a pull request to add @Guzzler! 🎉

@rowasc
Copy link
Contributor

rowasc commented Nov 1, 2019

hey @Obadha2 did you manage to test this? I'd like to release on monday but want to make sure we are OK with it

@CeciliaHinga
Copy link
Contributor

@Angamanga Is the expected behavior for this as you have explained on the issue what you meant? That if there no categories there should not be a category field type present on the list?If so, i do not have any categories on my deployment and i can still see the category field type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
8 participants