Feature: User Management
  The user endpoints allows an app admin user to create, modify and delete users.  User can modify their profiles.


Scenario: Admin user can create a new admin user
  Given I am an admin user
  And I create an admin user
  Then I get a new admin user
  And I can get an admin user profile

Scenario: Admin user can create a new editor user
  Given I am an admin user
  And I create an editor user
  Then I get a new editor user
  And I can get an editor user profile

Scenario: Editor user can not create a new admin user
  Given I am an editor user
  And I create an admin user
  Then I can get an unauthorized response

Scenario: Editor user can not create a new editor user
  Given I am an editor user
  And I create an editor user
  Then I get an unauthorized response

Scenario: Admin user can get an existing admin user
  Given I am an admin user
  And I get an admin user
  Then I can get an admin user profile

Scenario: Admin user can get an existing editor user
  Given I am an admin user
  And I get an editor user
  Then I can get an editor user profile

Scenario: Any user can not get an existing admin user
  Given I am an unauthenticated user
  And I get an admin user
  Then I get an unauthorized response

Scenario: Any user can not get an existing editor user
  Given I am an unauthenticated user
  And I get an editor user
  Then I get an unauthorized response

Scenario: Editor user can not get an existing admin user
  Given I am an editor user
  And I get an admin user
  Then I get an unauthorized response

Scenario: Editor user can not get an existing editor user that is not me
  Given I am an editor user
  And I get an editor user
  Then I get an unauthorized response

Scenario: Editor user can get my own profile
  Given I am an editor user
  And I get myself
  Then I can get my own user profile

Scenario: Admin user can modify an admin user
  Given I am an admin user
  And I modify the admin user
  Then my updates to the admin user are preserved

Scenario: Admin user can modify an editor user
  Given I am an admin user
  And I modify the editor user
  Then my updates to the editor user are preserved

Scenario: Editor user can not modify an editor user that is not self
  Given I am an editor user
  And I modify the editor user
  Then I get an unauthorized response

Scenario: Editor user can modify their own user
  Given I am an editor user
  And I modify my user
  Then my updates to the editor user are preserved

Scenario: Admin user can delete an admin user
  Given I am an admin user
  And I delete the admin user
  Then I get a messages that the admin user is deleted

Scenario: Admin user can delete an editor user
  Given I am an admin user
  And I delete the editor user
  Then I get a messages that the editor user is deleted

Scenario: Editor user can not delete an editor user
  Given I am an editor user
  And I delete the editor user
  Then I get an unauthorized response
