On 07/14/2014 06:14 AM, Wen Wang wrote:
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.
The next_url was used to redirect user to login when he/she first
accesses the console URL
(/vnc_auto.html?port=64667&path=?token=Ubuntu14.04&encrypt=1)
But as you said we can use the lastPage cookie for this case too
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.
Thanks!
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.
I have 2 more options to solve this problem:
1) Pass user roles as URL parameters to Kimchi logged UI
/#tabs/guests?roles=...
2) Let backend fill a variable in the cheetah template
<script>
kimchi.user = $data.user_info
</script>
Best Regards
Wang Wen
On 07/14/2014 06:16 AM, alinefm(a)linux.vnet.ibm.com wrote:
> From: Aline Manera <alinefm(a)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
>
_______________________________________________
Kimchi-devel mailing list
Kimchi-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel