[Kimchi-devel] [PATCH 0/3 WIP] Let frontend redirect user after logging

Wen Wang wenwang at linux.vnet.ibm.com
Mon Jul 14 09:14:48 UTC 2014


Thanks Aline,

for 1), I haven't found the place where the browser could get the var 
next_url and it did the redirect in the backend without giving anything 
to the front-end, which is the front end don't need "next_url", but 
instead we have lastPage stored in the cookie.

for 2) I sent a patch that can fix the quote appeared in "lastPage". 
Please apply the patch: [PATCH] Have the quote deleted from the url 
located in "lastPage" for it.

There still exists one problem, The login page use form to finish the 
redirection. The login page is totally seperated from the kimchi logged 
UI. varibles could not pass between those two htmls. We have two 
solutions that can save the varibles like user and role: 1. set the 
cookie with the role( since the username has already been stored. 2. We 
possibly need an API that have the Get method so that browser could use 
it for querying the role of the user.

Best Regards

Wang Wen

On 07/14/2014 06:16 AM, alinefm at linux.vnet.ibm.com wrote:
> From: Aline Manera <alinefm at linux.vnet.ibm.com>
>
> This patch set removes useless files related to former login design and redirect
> user in frontend after logging - that way frontend can store user information
> for authorization matters.
>
> The patch 2 has 2 problems:
> 1) the next URL is encoded using base64
>     So in UI I need to decode it. How do I do that?
>
> 2) while using kimchi.cookie.get() to get the lastPage it returns the URL with ""
>     So the redirection fails as it tries to redirect the user to "/#tabs/guests"
>     How do I remove those "" around the cookie value?
>
> Any help is welcome!
>
> Aline Manera (3):
>    Remove former login design files
>    Remove special console rules from nginx configuration
>    Let frontend redirect user after logging
>
>   src/kimchi/auth.py               |   6 --
>   src/kimchi/root.py               |  19 +-----
>   src/nginx.conf.in                |  11 ----
>   ui/js/src/kimchi.login.js        |  73 ++++++++++++++++++++++
>   ui/js/src/kimchi.login_window.js | 128 ---------------------------------------
>   ui/pages/login-window.html.tmpl  |  53 ----------------
>   ui/pages/login.html.tmpl         |  36 ++---------
>   7 files changed, 78 insertions(+), 248 deletions(-)
>   create mode 100644 ui/js/src/kimchi.login.js
>   delete mode 100644 ui/js/src/kimchi.login_window.js
>   delete mode 100644 ui/pages/login-window.html.tmpl
>




More information about the Kimchi-devel mailing list