Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #5547
Something went wrong while setting issue due date.
Closed
Open
Issue created 7 years ago by coudot@coudotReporter
  • New related issue

  • New related issue

Wrong expiration date shown in ppolicy dashboard

Closed

Wrong expiration date shown in ppolicy dashboard

When displaying expired accounts in ppolicy tab of dashboard, wrong expiration date is shown.

Indeed, the dashboard displays shadowExpire value instead of pwdChangedTime value.

Here is the little modifications I made to fix the issue:

In /usr/share/fusiondirectory/plugins/addons/dashboard/users_accounts.tpl, replace shadowExpire in 2 places by:

               {$account.pwdChangedTime}

In /usr/share/fusiondirectory/plugins/addons/dashboard/class_dashBoardPPolicy.inc, replace code after $lastChange->setTimezone(timezone::utc()) by:

      if (($lastChange->getTimeStamp() + $maxAge) < $now->getTimeStamp()) {
        $expired_account = dashboardUsers::get_user_infos($user);
        $expired_account['pwdChangedTime'] = $lastChange->format('Y-m-d H:i:s');
        $expired_accounts[] = $expired_account;
      } elseif (($lastChange->getTimeStamp() + $maxAge) < ($now->getTimeStamp() + $next_expired_days_seconds)) {
        $next_expired_account = dashboardUsers::get_user_infos($user);
        $next_expired_account['pwdChangedTime'] = $lastChange->format('Y-m-d H:i:s');
        $next_expired_accounts[] = $next_expired_account;
      }

I can provide a clean patch if needed.

(from redmine: issue id 5547, created on 2017-05-23, closed on 2017-06-12)

  • Changesets:
    • Revision 5b43fdc2 by Côme Chilliet on 2017-05-24T08:25:55.000Z:
Fixes #5547 Fixed ppolicy expiration date display
  • Revision a4cde4f9ca427926478063d3205b4ed7a6619f8f by Côme Chilliet on 2017-06-07T12:16:52.000Z:
Fixes #5547 Fixed ppolicy expiration date display
  • Custom Fields:
    • Bug in version: 1.1
    • Support contract: None

    Tasks

    0

    No tasks are currently assigned. Use tasks to break down this issue into smaller parts.

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Activity


    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      Set time spent

      (from redmine: written on 2017-05-24)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      Applied in changeset commit:fusiondirectory-plugins|5b43fdc2.

      (from redmine: written on 2017-05-24)

    • coudot
      coudot @coudot · 7 years ago
      Author Reporter

      Your patch on class_dashBoardPPolicy.inc is ok but you forgot to update users_accounts.tpl. You need to replace :

       {$account.shadowExpire}
      

      By:

       {$account.expirationDate}
      

      And I think you also need to update the column header and add a translation for "expirationDate" label.

      I can do this changes if you accept me as a contributor in FD. Let me know.

      (from redmine: written on 2017-06-07)

    • bmortier
      bmortier @bmortier · 7 years ago
      Maintainer

      hello clement,

      do a patch an attach it to the ticket

      Cheers

      (from redmine: written on 2017-06-07)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      No there is also this commit it does not appear here because it’s on core: https://forge.fusiondirectory.org/projects/fd/repository/revisions/f7915f980fbb46bc5ac9dbdaf6d0eafcce18c7b1

      It should be working fine you can test with the dev packages.

      (from redmine: written on 2017-06-07)

    • coudot
      coudot @coudot · 7 years ago
      Author Reporter

      You are right, I did not applied the pathc from core. It's working now, thanks!

      I'm not able to use dev packages because I don't want to have different versions between my stage and my production.

      Do you think you can include this issue in 1.1.2?

      (from redmine: written on 2017-06-07)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      There is no 1.1.2 scheduled for now as 1.2 is scheduled for this month.

      (from redmine: written on 2017-06-07)

    • bmortier
      bmortier @bmortier · 7 years ago
      Maintainer

      hello,

      i have applied it into 1.1.1-fixes so you can check it onto demo-fixes.fusiondirectory.org tommorow

      Cheers

      (from redmine: written on 2017-06-07)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      Applied in changeset commit:fusiondirectory-plugins|a4cde4f9ca427926478063d3205b4ed7a6619f8f.

      (from redmine: written on 2017-06-08)

    • Jonathan Swaelens
      Jonathan Swaelens @jswaelens · 7 years ago
      Developer

      Close issue

      (from redmine: written on 2017-06-12)

    • Côme Chilliet added 1h 30m of time spent 7 years ago

      added 1h 30m of time spent

    • Jonathan Swaelens closed 7 years ago

      closed

    • bmortier added Fixed and removed Bugs labels 7 years ago

      added Fixed and removed Bugs labels

    Please register or sign in to reply
    Assignee
    Côme Chilliet's avatar
    Côme Chilliet
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets