Skip to content

uPortal is not recognizing an admin user in some flows #2684

@cbeach47

Description

@cbeach47

Describe the bug
After calling https://github.com/uPortal-Project/uPortal-start/blob/7aad82418ee7e8252b403941ca070bceede9af4b/tests/ux/utils/ux-general-utils.ts#L12 from the playwright tests, the admin user does not appear to be considered an administrator anymore. This was discovered in some failing playwright tests.

This used to work in uP 5.14 . After commit e8db822 (2023-05-17 - Merge pull request #2660 from mgillian/feat/RDBMcache) it started to fail.

It may be unrelated, but on that same commit, the search API playwright test https://github.com/uPortal-Project/uPortal-start/blob/7aad82418ee7e8252b403941ca070bceede9af4b/tests/api/search-v5_0.spec.ts#L26 began failing - the user.login.id and uid json fields are no longer returned.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the latest uPortal-start and ensure it's using uPortal 5.15.0
  2. Login via the browser via http://localhost:8080/uPortal/Login?userName=admin&password=admin
  3. Note you can see all the tiles
  4. Run the playwright tests
  5. Note the 6 failing tests, including:
  • api/portlet-list.spec.ts:48:1 › GET list creation and retrieval with ownership
  • api/portlet-list.spec.ts:347:1 › PUT items entityId regex
  • api/portlet-list.spec.ts:530:1 › PUT Confirm admin can change ownership of someone elses list
  • api/portlet-list.spec.ts:641:1 › POST / PUT allow admin to specify name as favorites
  • api/portlet-list.spec.ts:719:1 › DELETE Confirm admin can delete someone elses list
  1. Refresh the browser page
  2. Note you can only see two of the tiles

Expected behavior
All playwright tests should pass, and the tiles on the admin page should not disappear.

Platform:

  • uPortal Version: [uPortal 5.15]
  • OS: [MacOS]
  • Browser [Firefox]

Additional context
Helpful log output can be found at least in portal/portal.log .

You can run a playwright test individually by appending .only to the method signature. For instance:

test("DELETE Confirm admin can delete their own list", async ({ request }) => {

can be run standalone using the following, and then invoking ./gradlew playwrightRun:

test.only("DELETE Confirm admin can delete their own list", async ({ request }) => {
  • Errors in the logs show the admin user is authenticated, but not deemed an 'administrator', so the portlet-list API is correctly failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions