Skip to content

Hide last log in column if disabled#40771

Merged
phil-davis merged 2 commits intomasterfrom
ent-5711
May 4, 2023
Merged

Hide last log in column if disabled#40771
phil-davis merged 2 commits intomasterfrom
ent-5711

Conversation

@phil-davis
Copy link
Copy Markdown
Contributor

@phil-davis phil-davis commented May 4, 2023

Description

When the Users page is first displayed, if the "Show last log in" setting is off, the hide the "Last Login" column.

1st commit adds 2 new acceptance test scenario, the 2nd scenario fails before the fix.

2nd commit fixes the issue and the tests pass.

Related Issue

How Has This Been Tested?

CI and manual check.

  1. admin browses to the users page
  2. turn off "Show last login" - the Last Login column disappears - good.
  3. Browse away to the Files page, then back to the Users page

Before the fix: "Last Login" column is shown, but the checkbox is off - bad.

fter the fix: "Last Login" column is not shown - good.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis phil-davis self-assigned this May 4, 2023
if ($('#CheckboxLastLogin').is(':checked')) {
$("#userlist .lastLogin").show();
} else {
$("#userlist .lastLogin").hide();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This fixes the issue. But I also tested other checkbox settings like "Show Creation Time". The setting of that works fine when browsing away and back, or logging out and logging in again. But the CheckboxCreationTime code here in users.js does not have the else that I have added here for CheckboxLastLogin. So I do not understand completely - I was expecting CheckboxCreationTime to have the same issue, but it does not have the issue.

@phil-davis phil-davis requested a review from jvillafanez May 4, 2023 07:18
@owncloud owncloud deleted a comment from update-docs bot May 4, 2023
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented May 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@owncloud owncloud deleted a comment from ownclouders May 4, 2023
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.

2 participants