Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lkarlslund/adalanche
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Feb 27, 2024
2 parents 5ebf4c0 + 3ab9960 commit 990e3ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/integrations/activedirectory/analyze/analyze-ad.go
Original file line number Diff line number Diff line change
Expand Up @@ -1260,10 +1260,12 @@ func init() {
object.Tag("account_enabled")
}

if exp, ok := object.Attr(activedirectory.AccountExpires).First().Raw().(time.Time); ok {
if !exp.IsZero() && time.Now().After(exp) {
object.Tag("account_expired")
expired = true
if object.HasAttr(activedirectory.AccountExpires) {
if exp, ok := object.Attr(activedirectory.AccountExpires).First().Raw().(time.Time); ok {
if !exp.IsZero() && time.Now().After(exp) {
object.Tag("account_expired")
expired = true
}
}
}

Expand Down

0 comments on commit 990e3ff

Please sign in to comment.