error not shown when there was a problem adding a role

RESOLVED WONTFIX

Status

Release Engineering
Balrog: Frontend
P3
normal
RESOLVED WONTFIX
8 months ago
3 months ago

People

(Reporter: bhearsum, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=js][lang=html][lang=css][good first bug][ready])

(Reporter)

Description

8 months ago
Johan discovered this:


    Click on "add a new user"
    Fill a name in.
    Enter an invalid role.

Results: Form submission error; See fields highlighted in red. But no field becomes red. HTTP response given: Bad input: Cannot grant a role to a user without any permissions


Looks like we don't set the error in $scope, so the template can't see it: https://github.com/mozilla/balrog/blob/ebbaffe5d47bf7a52735898cf460da751119a842/ui/app/js/controllers/user_edit_controller.js#L19 

We should be doing something more like: https://github.com/mozilla/balrog/blob/ebbaffe5d47bf7a52735898cf460da751119a842/ui/app/js/controllers/user_edit_controller.js#L19 

It might be good to have a look for other places that are incorrectly handling errors, too.

Comment 1

7 months ago
Hi, Can I work on this?
(Reporter)

Comment 2

7 months ago
(In reply to Nitin from comment #1)
> Hi, Can I work on this?

Yup, absolutely!
Assignee: nobody → prakash.nitin63

Comment 3

7 months ago
I'm having trouble understanding one thing here. Even if we are setting error for permissions then why don't we get a highlighted field in it for an incorrect input? This one is apart from roles. Like you said we don't actually set error for roles so the template isn't able to see it. But we do set error for permissions, right?

Comment 4

7 months ago
Alright. I figured out and submitted fixes for both roles and permissions.
(Reporter)

Comment 5

5 months ago
Nitin, are you still planning to look at this?
Flags: needinfo?(prakash.nitin63)
(Reporter)

Comment 6

4 months ago
Unassigning due to inactivity. If you want to pick it up again, feel free to.
Assignee: prakash.nitin63 → nobody
Flags: needinfo?(prakash.nitin63)
(Reporter)

Comment 7

3 months ago
The only way to reproduce this bug is not possible anymore due to UI changes. I'm closing this, because it's not worth fixing.
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.