Project

General

Profile

Actions

Feature #37115

closed

Update last_login_on when sending requests with API Key

Feature #37115: Update last_login_on when sending requests with API Key

Added by Andreas Skorczyk over 4 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Resolution:
Fixed

Description

Currently, users that access Redmine through the API with a given API key won't surface, as their last_login_on field doesn't get updated. This is a bit problematic in our case, as we can't easily distinguish between an inactive user and one that solely uses the API. The attached patch would change this behavior by calling user.update_last_login_on when finding the user via the API key.
Do you think it makes sense to apply this change or are there reasons against it?


Files

update_last_login_on_on_api_key.patch (409 Bytes) update_last_login_on_on_api_key.patch Andreas Skorczyk, 2022-05-13 11:14

Related issues 2 (0 open — 2 closed)

Related to Redmine - Defect #20648: Users' "Last connection" is not updated correctly.ClosedActions
Related to Redmine - Feature #43938: Track last usage of API and Atom access keysClosedMarius BĂLTEANUActions

Updated by Marius BĂLTEANU over 4 years ago Actions #1

  • Target version set to Candidate for next minor release

Updated by Marius BĂLTEANU over 4 years ago Actions #2

  • Target version changed from Candidate for next minor release to Candidate for next major release

Andreas Skorczyk wrote:

Do you think it makes sense to apply this change or are there reasons against it?

It makes sense to me to update the last_login_on. Any other opinions?

Updated by Go MAEDA over 4 years ago Actions #3

I think that if last_login_on is updated by requests via API, then it should also be updated by requests via a web browser.

Current:
  • `GET /issues` via browser don't update last_login_on
  • `GET /issues.json` via API don't update last_login_on
After applying the patch:
  • `GET /issues` via browser don't update last_login_on
  • `GET /issues.json` API updates last_login_on
Should be:
  • `GET /issues` via browser updates last_login_on
  • `GET /issues.json` API updates last_login_on

Updated by Go MAEDA over 4 years ago Actions #4

  • Related to Defect #20648: Users' "Last connection" is not updated correctly. added

Updated by tu tu over 3 years ago Actions #5

I met the same issue,My redmine version is 5.0.0.
However,I download the latest redmine code,it doesn't include this patch.So,does this issue fix in the latest redmine?

Updated by Go MAEDA 5 months ago Actions #6

  • Category set to Accounts / authentication
  • Status changed from New to Closed
  • Resolution set to Fixed

In Redmine 7.0.0, the API Access key section in the sidebar of the My account page will show when each API access key was last used. Therefore, I am closing this issue.

Please note that, even in Redmine 7.0.0, the "Last sign in" field is updated only when a user signs in through the web interface. API access does not update this field.

For details, please see #43938.

Updated by Go MAEDA 5 months ago Actions #7

  • Related to Feature #43938: Track last usage of API and Atom access keys added

Updated by Go MAEDA 5 months ago Actions #8

  • Target version deleted (Candidate for next major release)
Actions

Also available in: PDF Atom