]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: no side-effects on failed user creation 24200/head
authorJoao Eduardo Luis <joao@suse.de>
Thu, 20 Sep 2018 14:20:50 +0000 (15:20 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Tue, 25 Sep 2018 11:31:03 +0000 (12:31 +0100)
commit0dd8b8f81a1657521f593daeee798d8b650a58ef
treec28254ffdecaf45adf9dad26bcc16ea515b47890
parentc1bff2684fa2a194ea88f3c981df8b036105c857
mgr/dashboard: no side-effects on failed user creation

Read operations go first, operations with side-effects go last.
Otherwise, something like

1) create user A with non-existent role R1; fails due to R1 DNE
2) create user B with existent role R2; success

will result in both A and B being created; B will have a R2 assigned, A
will have no roles.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/pybind/mgr/dashboard/services/access_control.py
src/pybind/mgr/dashboard/tests/test_access_control.py