Skip to content

Hide last log in column if disabled #40771

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

Merged
merged 2 commits into from
May 4, 2023
Merged

Hide last log in column if disabled #40771

merged 2 commits into from
May 4, 2023

Conversation

phil-davis
Copy link
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
@@ -1108,6 +1108,8 @@ $(document).ready(function () {

if ($('#CheckboxLastLogin').is(':checked')) {
$("#userlist .lastLogin").show();
} else {
$("#userlist .lastLogin").hide();
Copy link
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

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