Skip to content

Commit

Permalink
Add Locked_Out and Recovery as valid account statuses (#14)
Browse files Browse the repository at this point in the history
Add Okta statuses LOCKED_OUT and RECOVERY as valid state.

This is to prevent eng_meta from getting blocked when users are locked out, typically from too many attempts to enter their password incorrectly. The users do inevitably go back to Active, but the delay can be significant.

Also updated the failure message for users who have left the company because as of the prior patch to allow suspended users, a user being suspended is no longer blocking.
  • Loading branch information
k-smathers authored Mar 7, 2024
1 parent 5e9008f commit 56fbf2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/terraorg/model/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def validate!(strict: true, allow_orphaned_associates: false)

# Do not allow the JSON files to contain any people who have left.
unless @people.inactive.empty?
$stderr.puts "ERROR: Users have left the company, or are Suspended in Okta: #{@people.inactive.map(&:id).join(', ')}"
$stderr.puts "ERROR: Users have left the company: #{@people.inactive.map(&:id).join(', ')}"
failure = true
end

Expand Down
2 changes: 1 addition & 1 deletion lib/terraorg/model/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# A DEACTIVATED account status needs to be removed from the repository before merging PRs

class Person
ACTIVE_USER_STATUSES = ['ACTIVE', 'PROVISIONED', 'PASSWORD_EXPIRED', 'SUSPENDED'].freeze
ACTIVE_USER_STATUSES = ['ACTIVE', 'PROVISIONED', 'PASSWORD_EXPIRED', 'SUSPENDED', 'LOCKED_OUT', 'RECOVERY'].freeze

attr_accessor :id, :name, :okta_id, :email, :status

Expand Down
2 changes: 1 addition & 1 deletion lib/terraorg/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

module Terraorg
VERSION = '0.5.4'
VERSION = '0.5.5'
end

0 comments on commit 56fbf2a

Please sign in to comment.