Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santillli <ciro.santilli@gmail.com>2014-01-27 18:53:59 +0400
committerCiro Santillli <ciro.santilli@gmail.com>2014-02-11 18:45:30 +0400
commit91571c078dee6297a17afecb6dc071ce882c82be (patch)
treed57688b9653182beaa345e6cabe11b50e4dfabee /features/user.feature
parent1284f21c073e42c44b9faa7b0ad1ec90b66ca8fb (diff)
User pages are visible to users without login
... if the user is authorized to at least one public project.
Diffstat (limited to 'features/user.feature')
-rw-r--r--features/user.feature69
1 files changed, 69 insertions, 0 deletions
diff --git a/features/user.feature b/features/user.feature
new file mode 100644
index 00000000000..c1c1ddda52b
--- /dev/null
+++ b/features/user.feature
@@ -0,0 +1,69 @@
+Feature: User
+ Background:
+ Given Create user "John Doe"
+ And "John Doe" is authorized to private project "Enterprise"
+
+ # Signed out
+
+ Scenario: I visit user "John Doe" page while not signed in when he is authorized to a public project
+ Given "John Doe" is authorized to internal project "Internal"
+ And "John Doe" is authorized to public project "Community"
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should not see project "Enterprise"
+ And I should not see project "Internal"
+ And I should see project "Community"
+
+ Scenario: I visit user "John Doe" page while not signed in when he is not authorized to a public project
+ Given "John Doe" is authorized to internal project "Internal"
+ When I visit user "John Doe" page
+ Then I should be redirected to sign in page
+
+ # Signed in as someone else
+
+ Scenario: I visit user "John Doe" page while signed in as someone else when he is authorized to a public project
+ Given "John Doe" is authorized to public project "Community"
+ And "John Doe" is authorized to internal project "Internal"
+ And I sign in as a user
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should not see project "Enterprise"
+ And I should see project "Internal"
+ And I should see project "Community"
+
+ Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a public project
+ Given "John Doe" is authorized to internal project "Internal"
+ And I sign in as a user
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should not see project "Enterprise"
+ And I should see project "Internal"
+ And I should not see project "Community"
+
+ Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a project I can see
+ Given I sign in as a user
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should not see project "Enterprise"
+ And I should not see project "Internal"
+ And I should not see project "Community"
+
+ # Signed in as the user himself
+
+ Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has a public project
+ Given "John Doe" is authorized to internal project "Internal"
+ And "John Doe" is authorized to public project "Community"
+ And I sign in as "John Doe"
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should see project "Enterprise"
+ And I should see project "Internal"
+ And I should see project "Community"
+
+ Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has no public project
+ Given I sign in as "John Doe"
+ When I visit user "John Doe" page
+ Then I should see user "John Doe" page
+ And I should see project "Enterprise"
+ And I should not see project "Internal"
+ And I should not see project "Community"