Skip to content

Conversation

@stefanvit
Copy link
Collaborator

Description

Please, provide an admin API for filtering accounts which are signed in in a specific date-time range.

The filter should contain at least 3 optional fields:

user_role (the same like in the get accounts API: https://api-dev.rokwire.illinois.edu/core/doc/ui/index.html#/Admin/get_admin_application_accounts)
start date time
end date time
anonymous
user_role
The result should include the user account as well as its NetID, UIN, email, First and Last names

Additional context
Source: https://github.com/rokwire/illinois_admin/issues/742#issuecomment-3137176802

**Resolves #789

Review Time Estimate

  • Immediately
  • Within a week
  • When possible

Type of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Other (any another change that does not fall in one of the above categories.)

Checklist:

  • I have signed the Rokwire Contributor License Agreement (CLA). (Any contributor who is not an employee of the University of Illinois whose official duties include contributing to the Rokwire software, or who is not paid by the Rokwire project, needs to sign the CLA before their contribution can be accepted.)
  • I have updated the CHANGELOG.
  • I have read the Contributor Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My change requires updating the documentation.
  • I have made necessary changes to the documentation.
  • I have added tests related to my changes.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Stefan Vitanov added 15 commits August 18, 2025 10:37
…n-accounts

* main:
  update version to 1.57.0
  [ID-790] Twilio phone login does not perform verification - logs & fix (#796)
  Just add logs to investigate twilio phone issue

# Conflicts:
#	CHANGELOG.md
…n-accounts

* main:
  Prepare v1.57.2
  [ID-790] Twilio phone login does not perform verification - fix (#799)
  fot fix
  Fix lint issue..
  update version to 1.57.1
  More logs..arh

# Conflicts:
#	CHANGELOG.md
…n-accounts

* main:
  Prepare v1.57.3
  [ID-800] Improve logs (#801)
@stefanvit stefanvit linked an issue Aug 24, 2025 that may be closed by this pull request
@stefanvit
Copy link
Collaborator Author

stefanvit commented Aug 24, 2025

Hi @petyos, i have test it and i think it is ok, but could you please take a deeper look at this because the pipeline is complicated and i want to be sure. i am working with outer join for first time and i want everything to be ok. Thank you!

Stefan Vitanov added 2 commits August 24, 2025 21:51
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already have an API that provides the sessions(https://api-dev.rokwire.illinois.edu/core/doc/ui/index.html#/Admin/get_admin_application_login_sessions), and we just need to extend it with the required parameters. We can add a new field called “account” to the current login session type. This account will be populated only for non-anonymous users and will be null for anonymous ones.

Stefan Vitanov added 8 commits August 25, 2025 21:14
…d-in-accounts

* develop:
  [#791] Research profiles improvement filtering (#809)
  update version to 1.58.0
  [ID-806] Improve database performance (#807)
  update version to 1.57.4
  [#803] Service token aud validation failing  (#804)
@stefanvit stefanvit requested a review from petyos September 30, 2025 13:39
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not filtering by user-role; instead, after fetching the login sessions, you try to map the accounts to those sessions.

But imagine the following scenario: I send a user-role with the value abc, your query does not filter by abc, and it returns 20 records to the client. The client expects 0, since they provided a user-role.

We discussed that you should use a join between login sessions and accounts.

@stefanvit stefanvit requested a review from petyos October 23, 2025 13:04
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take into account the feedback.

@stefanvit stefanvit requested a review from petyos October 29, 2025 13:58
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take the feedback I leave carefully and make sure to polish your work.

@stefanvit stefanvit requested a review from petyos October 31, 2025 12:35
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take into account the feedback

Stefan Vitanov added 3 commits November 7, 2025 11:04
…n-accounts

* main:
  update version the version to 1.60.1
  [ID-814] Improve refresh token grace period logging (#815)
  update version to 1.60.0
  [#811] Implement refresh token reuse detection grace period (#812)

# Conflicts:
#	.secrets.baseline
#	CHANGELOG.md
@stefanvit
Copy link
Collaborator Author

@petyos Hi, this is mi first time with the indexes so if you could please tell me if its ok and maybe give me some advice of how to handle it. The api as working as its suposed to. Thank

@stefanvit stefanvit requested a review from petyos November 17, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Admin API for filtering signed-in accounts

3 participants