Closed Bug 1163200 Opened 9 years ago Closed 7 years ago

replace "add a new user" with "add a new permission"

Categories

(Release Engineering Graveyard :: Applications: Balrog (frontend), defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhirata, Assigned: hope.ngerebara, Mentored)

References

Details

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

1. go to balrog site
2. sign in through ldap
3. select permissions
4. click on add a new user

Expected: need admin rights or such ( I had no account initially )
Actual: no error message.  I was able to create an account, I tried placing in admin that's when I got an error message.  The permission wasn't granted, the account was created though.
Removing relation to bug 1163228, since that was actually caused by something totally different.

Naoki, can you give me a more detailed STR? I suspect this is a UI/UX issue, not an actual problem.
Flags: needinfo?(nhirata.bugzilla)
https://aus4-admin.mozilla.org/permissions

is the permissions page, and I believe it's because I had ldap access w/ group balrog already.  I wasn't able to add a permissions, I was however able to create an account.

It just might be UX/UI bug.
Flags: needinfo?(nhirata.bugzilla)
This really is a UX issue. The Permissions UI thinks of accounts and permissions separately, whereas the backend and database require a user to have a permission to have an "account". I think the best thing to do here is replace the "Add a new User" button with "Add a new Permission", and have that pop a dialog that allows one to enter a username and permission.
Mentor: bhearsum
Summary: anyone who has access to the ui interface can create an account regardless of not having an account. → replace "add a new user" with "add a new permission"
Whiteboard: [lang=js][good first bug]
Hello Ben,

I  would like to work on this bug. I feel glad if you can assist me in fixing it.

Thank You.
Assignee: nobody → alessioscarapazzi
Status: NEW → ASSIGNED
Alessio, have you made any progress on this?
Flags: needinfo?(alessioscarapazzi)
:bhearsum Sorry for taking that long :( .. I'll work on this tonight
Flags: needinfo?(alessioscarapazzi)
:bhearsum latest tomorrow night..
(In reply to Alessio from comment #6)
> :bhearsum Sorry for taking that long :( .. I'll work on this tonight

It's OK. I was just making sure you're still planning to look at it :).
(In reply to Ben Hearsum (:bhearsum) from comment #8)
> (In reply to Alessio from comment #6)
> > :bhearsum Sorry for taking that long :( .. I'll work on this tonight
> 
> It's OK. I was just making sure you're still planning to look at it :).

Looks like you're unable to work on this right now. That's no problem, but I'm going to unassign it in case somebody else can have a look before you can.
Assignee: alessioscarapazzi → nobody
Status: ASSIGNED → NEW
Hi Ben,

I would be interested in fixing this bug if it still remains free.

Thanks,
Sam
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #0)
> 1. go to balrog site
> 2. sign in through ldap
> 3. select permissions
> 4. click on add a new user
> 
> Expected: need admin rights or such ( I had no account initially )
> Actual: no error message.  I was able to create an account, I tried placing
> in admin that's when I got an error message.  The permission wasn't granted,
> the account was created though.

Hi Naoki!
Can you give me a brief explanation and the link of the balrog so that i can work on it as my first bug?
Hi Ben! I would like to take this up. Can you please assign it to me and help me get started in this?
Flags: needinfo?(bhearsum)
(In reply to Aman Dwivedi from comment #12)
> Hi Ben! I would like to take this up. Can you please assign it to me and
> help me get started in this?

Absolutely. Once you've got the development environment up and running (see https://github.com/mozilla/balrog/blob/master/README.rst), have a look at http://localhost:8080/permissions and read comment #3 to see what it is we want to do here. You will likely need to change a few views and controllers to fix this, including:
https://github.com/mozilla/balrog/blob/master/ui/app/templates/permissions.html
https://github.com/mozilla/balrog/blob/master/ui/app/templates/permissions_modal.html
https://github.com/mozilla/balrog/blob/master/ui/app/js/controllers/permissions_controller.js
https://github.com/mozilla/balrog/blob/master/ui/app/js/controllers/user_edit_controller.js

I know this may be a lot to take in, so feel free to reach out here or on irc (irc://irc.mozilla.org/#balrog) if you have any questions.
Assignee: nobody → dwivedi.aman96
Flags: needinfo?(bhearsum)
Hi,

I would like to work on this bug if it is not assigned to anyone.
(In reply to Shruti Singh from comment #14)
> Hi,
> 
> I would like to work on this bug if it is not assigned to anyone.

Aman, are you still looking at this? If not, I'd like to reassign it to Shruti.
Flags: needinfo?(dwivedi.aman96)
Priority: -- → P3
Hi Ben! Sorry for delay. I m facing difficulty in making the dev setup. There are some system issues. If Shruti can follow with it, would be well and good. :)
Flags: needinfo?(dwivedi.aman96)
(In reply to Aman Dwivedi from comment #16)
> Hi Ben! Sorry for delay. I m facing difficulty in making the dev setup.
> There are some system issues. If Shruti can follow with it, would be well
> and good. :)

No worries, sorry to hear that.

Shruti, if you still want to have a look at this, instructions are in comment #13.
Assignee: dwivedi.aman96 → shrutisingh7219
(In reply to Ben Hearsum (:bhearsum) from comment #17)
> (In reply to Aman Dwivedi from comment #16)
> > Hi Ben! Sorry for delay. I m facing difficulty in making the dev setup.
> > There are some system issues. If Shruti can follow with it, would be well
> > and good. :)
> 
> No worries, sorry to hear that.
> 
> Shruti, if you still want to have a look at this, instructions are in
> comment #13.

Thank you :)
Looking forward to fix it.
Hi Ben!
Instead of starting with this, Can I start with good first bugs?
Hi,Ben!

I have issues with running docker on ubuntu 14.04
I got Error- Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
When I enter command "sudo service docker start", It shows a messsage-"start: Job is already running: docker
"
Will you please help me?
(In reply to Shruti Singh from comment #20)
> Hi,Ben!
> 
> I have issues with running docker on ubuntu 14.04
> I got Error- Cannot connect to the Docker daemon at
> unix:///var/run/docker.sock. Is the docker daemon running?
> When I enter command "sudo service docker start", It shows a
> messsage-"start: Job is already running: docker
> "
> Will you please help me?

Shruti, first of all, did you do the post-install step for docker to be able to run it as non-root? You can find the instructions at https://docs.docker.com/engine/installation/linux/linux-postinstall/#/manage-docker-as-a-non-root-user

Second, did you install docker-compose? If not, you need to grab that as well. You can find the install guide at https://docs.docker.com/compose/install/

After you have everything set up you can just run docker-compose up in the balrog folder to get started.
Are you still planning to look at this Shruti?
Flags: needinfo?(shrutisingh7219)
(In reply to Ben Hearsum (:bhearsum) from comment #22)
> Are you still planning to look at this Shruti?
Hi, Ben!

I am facing some issue regarding installation of docker.It would be fine if anyone else wants to take it up. :)
Thank you and sorry for the inconvenience.:)
(In reply to Shruti Singh from comment #23)
> (In reply to Ben Hearsum (:bhearsum) from comment #22)
> > Are you still planning to look at this Shruti?
> Hi, Ben!
> 
> I am facing some issue regarding installation of docker.It would be fine if
> anyone else wants to take it up. :)
> Thank you and sorry for the inconvenience.:)

No worries.
Assignee: shrutisingh7219 → nobody
Flags: needinfo?(shrutisingh7219)
Hi Ben, I think this needs to be done to. Can I send a PR regarding this bug?
(In reply to Nitin from comment #25)
> Hi Ben, I think this needs to be done to. Can I send a PR regarding this bug?

Yep.
Assignee: nobody → prakash.nitin63
Nitin, are you still planning to look at this?
Flags: needinfo?(prakash.nitin63)
Unassigning due to inactivity. If you want to pick it up again, feel free to.
Assignee: prakash.nitin63 → nobody
Flags: needinfo?(prakash.nitin63)
Hi Ben, 
I am starting with my first bug and would like to work on this.
I am trying to do the dev setup and get the following errors in console-

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
parent_controller.js:16 500 "API Proxying to `/api/rules` failed with: `Error: getaddrinfo ENOTFOUND`"
responseError @ parent_controller.js:16
rules_controller.js:68 Arguments(4)
(anonymous) @ rules_controller.js:68

Also, when I run docker-compose up, this is what I get-
 Traceback (most recent call last):
balrogagent_1  |   File "/app/balrogagent/cmd.py", line 28, in run_agent
balrogagent_1  |     auth=auth, loop=loop)
balrogagent_1  |   File "/app/balrogagent/client.py", line 32, in request
balrogagent_1  |     resp = await aiohttp.request(method, url, data=json.dumps(data), headers=headers, auth=auth, loop=loop)
balrogagent_1  |   File "/usr/local/lib/python3.5/site-packages/aiohttp/client.py", line 585, in __await__
balrogagent_1  |     return (yield from self._coro)
balrogagent_1  |   File "/usr/local/lib/python3.5/site-packages/aiohttp/client.py", line 186, in _request
balrogagent_1  |     conn = yield from self._connector.connect(req)
balrogagent_1  |   File "/usr/local/lib/python3.5/site-packages/aiohttp/connector.py", line 331, in connect
balrogagent_1  |     .format(key, exc.strerror)) from exc
balrogagent_1  | aiohttp.errors.ClientOSError: [Errno -2] Cannot connect to host balrogadmin:7070 ssl:False [Can not connect to balrogadmin:7070 [Name or service not known]]

Could you please help me with this?
Flags: needinfo?(bhearsum)
(In reply to Amola Singh (:amosingh) from comment #29)
> Hi Ben, 
> I am starting with my first bug and would like to work on this.
> I am trying to do the dev setup and get the following errors in console-
> 
> Failed to load resource: the server responded with a status of 500 (Internal
> Server Error)
> parent_controller.js:16 500 "API Proxying to `/api/rules` failed with:
> `Error: getaddrinfo ENOTFOUND`"
> responseError @ parent_controller.js:16
> rules_controller.js:68 Arguments(4)
> (anonymous) @ rules_controller.js:68
> 
> Also, when I run docker-compose up, this is what I get-
>  Traceback (most recent call last):
> balrogagent_1  |   File "/app/balrogagent/cmd.py", line 28, in run_agent
> balrogagent_1  |     auth=auth, loop=loop)
> balrogagent_1  |   File "/app/balrogagent/client.py", line 32, in request
> balrogagent_1  |     resp = await aiohttp.request(method, url,
> data=json.dumps(data), headers=headers, auth=auth, loop=loop)
> balrogagent_1  |   File
> "/usr/local/lib/python3.5/site-packages/aiohttp/client.py", line 585, in
> __await__
> balrogagent_1  |     return (yield from self._coro)
> balrogagent_1  |   File
> "/usr/local/lib/python3.5/site-packages/aiohttp/client.py", line 186, in
> _request
> balrogagent_1  |     conn = yield from self._connector.connect(req)
> balrogagent_1  |   File
> "/usr/local/lib/python3.5/site-packages/aiohttp/connector.py", line 331, in
> connect
> balrogagent_1  |     .format(key, exc.strerror)) from exc
> balrogagent_1  | aiohttp.errors.ClientOSError: [Errno -2] Cannot connect to
> host balrogadmin:7070 ssl:False [Can not connect to balrogadmin:7070 [Name
> or service not known]]
> 
> Could you please help me with this?

This is usually rooted in issues with the balrogadmin container - did it have any issues coming up? "docker-compose logs balrogadmin" should be able to tell you.
Flags: needinfo?(bhearsum)
Priority: P3 → P5
Assignee: nobody → hope.ngerebara
Hi Ben, want to work on this but please can you give more context to this bug? Am I to only change the "add a new user" to add a new permission? because after adding a user, the permissions modal still pops up.
Flags: needinfo?(bhearsum)
The backend needs to be modified as well not just the text, but I want to get more context to this bug please
(In reply to Hope Ngerebara from comment #31)
> Hi Ben, want to work on this but please can you give more context to this
> bug? Am I to only change the "add a new user" to add a new permission?
> because after adding a user, the permissions modal still pops up.

Sorry for the delayed response. After rereading the bug, I do think the best thing to do is just replace the text on the button. I can't think of anything we'd need to change in the backend to resolve this...
Flags: needinfo?(bhearsum)
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/682ddcb176ab18f210cafd34410022fa5eab321e
bug 1163200: Replace add a new user with add a new permission (#387). r=bhearsum
(In reply to Ben Hearsum (:bhearsum) from comment #33)
> (In reply to Hope Ngerebara from comment #31)
> > Hi Ben, want to work on this but please can you give more context to this
> > bug? Am I to only change the "add a new user" to add a new permission?
> > because after adding a user, the permissions modal still pops up.
> 
> Sorry for the delayed response. After rereading the bug, I do think the best
> thing to do is just replace the text on the button. I can't think of
> anything we'd need to change in the backend to resolve this...

Hope, you ended up being more ambitious and enhancing the user creation and edit dialogs. Now that that is merged, how do you feel about carrying over those changes to the "Schedule Changes" modal and "New Scheduled Permission Change" button on http://localhost:8080/permissions/scheduled_changes?
Flags: needinfo?(hope.ngerebara)
Hi Ben, yes I can. Will start working on it
Flags: needinfo?(hope.ngerebara)
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/0b57e4b5b7a9284acaac1678f5e93be9d6b4af8d
bug 1163200: add dropdown to permissions schduled change (#403). r=bhearsum
This is in production - thank you Hope!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.