public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Philipp Hufnagl <p.hufnagl@proxmox.com>
Subject: Re: [pve-devel] [PATCH proxmox-widget-toolkit v1 2/2] fix #4546: utils: save expiring date of user account for UI
Date: Fri, 6 Oct 2023 15:16:31 +0200	[thread overview]
Message-ID: <5bca3155-3fc9-4f80-878a-31c4369d20c3@proxmox.com> (raw)
In-Reply-To: <20230922143658.1639173-5-p.hufnagl@proxmox.com>

Comments inline.

On 9/22/23 16:36, Philipp Hufnagl wrote:
> When an user experation date is send with the /accesss/tickets POST API
                     ^                   ^               ^
some minor typos: expiration          sent             access
> call, it will be stored in a global variable like the username
> 
> Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
> ---
(...)
> diff --git a/src/Utils.js b/src/Utils.js
> index a7ded2a..5481a32 100644
> --- a/src/Utils.js
> +++ b/src/Utils.js
> @@ -309,6 +309,9 @@ utilities: {
>   
>       setAuthData: function(data) {
>   	Proxmox.UserName = data.username;
> +	if (data.user_expieres !== '') {
Shouldn't this be !== null?

So maybe just do a
if (data['account-expiry-date']) {
     ...
}

> +	    Proxmox.UserExpires = data.user_expieres;
typo, and same general remark regarding the naming as in the
`access-control` patch.> +	}
>   	Proxmox.LoggedOut = data.LoggedOut;
>   	// creates a session cookie (expire = null)
>   	// that way the cookie gets deleted after the browser window is closed

Also, the CSS changes found in this commit should probably be in another 
commit.

Furthermore, I'd probably send the widget-toolkit patches before the
pve-manager patches, since you require the `Proxmox.UserExpires`
variable to be set in your changes for `pve-manager`.

-- 
- Lukas




  reply	other threads:[~2023-10-06 13:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 14:36 [pve-devel] [PATCH manager/access-control/proxmox-widget-toolkit v1 0/4] fix #4546: Show warning hint/badge if user account is expiring in next few days Philipp Hufnagl
2023-09-22 14:36 ` [pve-devel] [PATCH manager v1 1/1] fix #4546: ui: notify user if their user account expires soon Philipp Hufnagl
2023-10-06 13:16   ` Lukas Wagner
2023-10-10 10:15     ` Philipp Hufnagl
2023-09-22 14:36 ` [pve-devel] [PATCH access-control v1 1/1] fix #4546: api: Return user expiration date on access/ticket API call Philipp Hufnagl
2023-10-06 13:16   ` Lukas Wagner
2023-09-22 14:36 ` [pve-devel] [PATCH proxmox-widget-toolkit v1 1/2] fix #4546: css: Inform user administrator about user accounts expiring soon Philipp Hufnagl
2023-10-06 13:16   ` Lukas Wagner
2023-10-06 14:41     ` Stefan Sterz
2023-10-10 10:18       ` Philipp Hufnagl
2023-09-22 14:36 ` [pve-devel] [PATCH proxmox-widget-toolkit v1 2/2] fix #4546: utils: save expiring date of user account for UI Philipp Hufnagl
2023-10-06 13:16   ` Lukas Wagner [this message]
2023-10-06 14:41   ` Stefan Sterz
2023-10-06 13:16 ` [pve-devel] [PATCH manager/access-control/proxmox-widget-toolkit v1 0/4] fix #4546: Show warning hint/badge if user account is expiring in next few days Lukas Wagner
2023-10-09 13:07   ` Philipp Hufnagl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bca3155-3fc9-4f80-878a-31c4369d20c3@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=p.hufnagl@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal