Kolibri: Try to edit my new admin role to learner

Created on 14 Aug 2018  Â·  11Comments  Â·  Source: learningequality/kolibri

Observed behavior


Observe, I try to added a new admin user, and Edit by own account role to learner account.

error-bad-request

Expected behavior


It will change to learner account with no error messages.

Context


Kolibri 0.11.0a5
windows 7
firefox 61.0.2 (64-bit)

P1 - important bug

All 11 comments

@jtamiace @khangmach what is the expected behavior here? We should either:

  1. prevent the user from lowering their user type
  2. log them out after the action is taken

I believe we have precedent in similar situations to follow

Previously we had prevented this.

Or possibly logged them out, either way, I remember us handling this case previously.

Looks like in 0.10, it just logs out the admin and returns them to the Learn page as a guest. This seems okay to me still to keep.

Another (probably separate) issue that I observed in 0.11 is that:

  1. changing the role of another user
  2. clicking save

doesn't close the modal when it should

Looks like in 0.10, it just logs out the admin and returns them to the Learn page as a guest. This seems okay to me still to keep.

Okay, let's do this!

Another (probably separate) issue

Made an issue here - #4211

(@jtamiace remember to remove 'needs design' when it's resolved)

it just logs out the admin and returns them to the Learn page as a guest. This seems okay to me still to keep.

I can confirm this behavior in 0.10... but I have no idea what causes the log out. The updateUser action (and the functions it calls) don't seem to touch the session, nor does the edit-user-modal.

@rtibbles You have any idea why calling updateUser or redirecting to /learn would logout in 0.10 but not in 0.11? Adding the redirect locally doesn't seem to log the user out :confused:

I am more confused by the fact that it worked in 0.10 than it doesn't work in 0.11. I would suggest just calling the core logout function here.

But the core logout function redirects to the logout page, then takes you to the login page. Is there any way to have it take you to /learn?

Hrm, maybe we should just direct them back to the login screen?

(Alternatively, if we want to retain the current behaviour, we could enhance the logout function to take an optional 'next' url after logout).

Hrm, maybe we should just direct them back to the login screen?

@jtamiace You OK with this? Also, would it be alright if the same thing happened when they drop down to a learner?

Redirect to the login screen for both of those scenarios makes sense to me

Was this page helpful?
0 / 5 - 0 ratings