Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Inactive users] Webadmin routes to list users login activity #1363

Open
Arsnael opened this issue Dec 4, 2024 · 1 comment
Open

[Inactive users] Webadmin routes to list users login activity #1363

Arsnael opened this issue Dec 4, 2024 · 1 comment

Comments

@Arsnael
Copy link
Member

Arsnael commented Dec 4, 2024

After having the TMailUserRepositoryAuthenticator, we can finally write the webadmin routes that will allow us to list users login activity.

There would be two routes:

curl -XGET /reports/users/connection
[
 {
   "username": "[email protected]",
   "imap": {
       "lastConnectionDate": "XXXX",
       "ipAddress": "XXX",
       "userAgent": "XXX"
   },
   "smtp": {
       "lastConnectionDate": "XXXX",
       "ipAddress": "XXX",
       "userAgent": "XXX"
   }
  },
...
]

This route would list last connection info of every users present in the system.

We need as well to add a filter to that route:

curl -XGET /reports/users/connection?activitySince=3month

Where activitySince is a duration that allows to filter and return a list of users active during this duration.

And we can have as well a more fine-grained route, per user:

curl -XGET /reports/users/connection/btellier@linagora
 {
   "username": "[email protected]",
   "imap": {
       "lastConnectionDate": "XXXX",
       "ipAddress": "XXX",
       "userAgent": "XXX"
   },
   "smtp": {
       "lastConnectionDate": "XXXX",
       "ipAddress": "XXX",
       "userAgent": "XXX"
   }
  }

DoD:

  • Guice bindings
  • Integration tests
  • Documentation
@Arsnael
Copy link
Member Author

Arsnael commented Dec 4, 2024

Remark: shall we add a filter as well to return users that have not been active during the duration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant