<commit_before>Feature:

  As an Admin 
  I want to disable and later re-enable user accounts via the web interface
  So that only those who should have access are able to access the system,

  # Scenario: Disabled user can't log in
  #   see user_login.feature

  Scenario: Admin disables a user from the edit page

    Given a user "george"
    And I am logged in as a user with "Admin,Disable Users" permissions
    And I am on edit user page for "george"

    When I check "Disabled?"
    And I press "Update"
    Then user "george" should be disabled
    When I am on the manage users page
    And the user "george" should be marked as disabled
	  When I follow "Show" within "#user-row-george"
	  Then I should see "Disabled"

  Scenario: Admin re-enables a user from the edit page

    Given a user "george"
    And user "george" is disabled
    And I am logged in as a user with "Admin,Disable Users" permissions
    And I am on edit user page for "george"

    When I uncheck "Disabled?"
    And I press "Update"

    Then user "george" should not be disabled
    When I go to the manage users page
    And the user "george" should be marked as enabled
	  When I follow "Show" within "#user-row-george"
	  Then I should see "Enabled"
  
  @allow-rescue
  Scenario: A user who is disabled mid-session can't continue using that session

    Given a user "george"
    And I am logged in as "george"
    And I am on the children listing page

    When user "george" is disabled
    And I follow "Register New Child"

    Then I should see "Unauthorized"
<commit_msg>Revert "#TECH - Ashok - Removed the wip in user_diable feature"<commit_after>Feature:

  As an Admin 
  I want to disable and later re-enable user accounts via the web interface
  So that only those who should have access are able to access the system,

  # Scenario: Disabled user can't log in
  #   see user_login.feature

  @wip
  Scenario: Admin disables a user from the edit page

    Given a user "george"
    And I am logged in as a user with "Admin,Disable Users" permissions
    And I am on edit user page for "george"

    When I check "Disabled?"
    And I press "Update"
    Then user "george" should be disabled
    When I am on the manage users page
    And the user "george" should be marked as disabled
	  When I follow "Show" within "#user-row-george"
	  Then I should see "Disabled"

  @wip
  Scenario: Admin re-enables a user from the edit page

    Given a user "george"
    And user "george" is disabled
    And I am logged in as a user with "Admin,Disable Users" permissions
    And I am on edit user page for "george"

    When I uncheck "Disabled?"
    And I press "Update"

    Then user "george" should not be disabled
    When I go to the manage users page
    And the user "george" should be marked as enabled
	  When I follow "Show" within "#user-row-george"
	  Then I should see "Enabled"
  
  @allow-rescue
  Scenario: A user who is disabled mid-session can't continue using that session

    Given a user "george"
    And I am logged in as "george"
    And I am on the children listing page

    When user "george" is disabled
    And I follow "Register New Child"

    Then I should see "Unauthorized"

{'fraction_non_alphanumeric': 0.05271366188396756, 'fraction_numerical': 0.0, 'mean_word_length': 2.9543773119605423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5548688', 'n_tokens_mistral': 949, 'n_tokens_neox': 910, 'n_words': 500}