trento-project / web

The companion web app for SUSE Linux Enterprise Server for SAP Applications
https://trento-project.io
Other
33 stars 15 forks source link

Filter out unnecessary options #2946

Closed nelsonkopliku closed 1 month ago

nelsonkopliku commented 2 months ago

Description

This PR makes sure that the relevant options are shown in Activity log's filter by activity type given the user's permission.

Currently the need is that users without user management abilities (all:all or all:users) do not see related options to filter by (Login Attempt, User Created, User Modified, User Deleted, Profile Updated). Those activities won't ever be returned by the API anyways.

How was this tested?

Automated tests.

nelsonkopliku commented 2 months ago

@abravosuse if you want to test this enhancement, here you have the PR environment https://2946.prenv.trento.suse.com/

The expected behavior should be

abravosuse commented 2 months ago

@abravosuse if you want to test this enhancement, here you have the PR environment https://2946.prenv.trento.suse.com/

The expected behavior should be

  • see user mgmt options in the filter

    • only all:all (aka superadmin)
    • only all:users
    • all:all + some other abilities that is not all:users
    • all:users + some other abilities that is not all:all
  • don't see user mgmt options in the filter

    • any abilities combination that does not contain all:all and all:users

I will test it @nelsonkopliku. Thank you. Just one question: can I update my rolling environment with this image or do I need to reinstall from scratch?

nelsonkopliku commented 2 months ago

@abravosuse I believe you could just update reference to this image ghcr.io/trento-project/trento-web:2946-env, if testing on the PR env is not enough.

abravosuse commented 2 months ago

@abravosuse I believe you could just update reference to this image ghcr.io/trento-project/trento-web:2946-env, if testing on the PR env is not enough.

It should be enough @nelsonkopliku . What's the admin password again in the PR environment? Sorry I keep forgetting it...