Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eb6c0202
Commit
eb6c0202
authored
Feb 06, 2020
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spec description with new scoped routing
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
6341e336
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
84 deletions
+84
-84
ee/spec/features/security/group/internal_access_spec.rb
ee/spec/features/security/group/internal_access_spec.rb
+4
-4
ee/spec/features/security/group/private_access_spec.rb
ee/spec/features/security/group/private_access_spec.rb
+4
-4
ee/spec/features/security/group/public_access_spec.rb
ee/spec/features/security/group/public_access_spec.rb
+4
-4
ee/spec/features/security/project/internal_access_spec.rb
ee/spec/features/security/project/internal_access_spec.rb
+9
-9
ee/spec/features/security/project/private_access_spec.rb
ee/spec/features/security/project/private_access_spec.rb
+8
-8
ee/spec/features/security/project/public_access_spec.rb
ee/spec/features/security/project/public_access_spec.rb
+9
-9
spec/features/security/group/internal_access_spec.rb
spec/features/security/group/internal_access_spec.rb
+4
-4
spec/features/security/group/private_access_spec.rb
spec/features/security/group/private_access_spec.rb
+4
-4
spec/features/security/group/public_access_spec.rb
spec/features/security/group/public_access_spec.rb
+4
-4
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+9
-9
spec/features/security/project/private_access_spec.rb
spec/features/security/project/private_access_spec.rb
+8
-8
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+9
-9
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+8
-8
No files found.
ee/spec/features/security/group/internal_access_spec.rb
View file @
eb6c0202
...
...
@@ -39,13 +39,13 @@ describe '[EE] Internal Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:internal
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -53,13 +53,13 @@ describe '[EE] Internal Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
...
...
ee/spec/features/security/group/private_access_spec.rb
View file @
eb6c0202
...
...
@@ -39,13 +39,13 @@ describe '[EE] Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -53,13 +53,13 @@ describe '[EE] Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
...
...
ee/spec/features/security/group/public_access_spec.rb
View file @
eb6c0202
...
...
@@ -39,13 +39,13 @@ describe '[EE] Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -53,13 +53,13 @@ describe '[EE] Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
...
...
ee/spec/features/security/project/internal_access_spec.rb
View file @
eb6c0202
...
...
@@ -32,13 +32,13 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -50,7 +50,7 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -68,7 +68,7 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -106,19 +106,19 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -129,7 +129,7 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
@@ -254,7 +254,7 @@ describe '[EE] Internal Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:maintainer
).
of
(
project
)
}
...
...
ee/spec/features/security/project/private_access_spec.rb
View file @
eb6c0202
...
...
@@ -32,13 +32,13 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -50,7 +50,7 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -62,7 +62,7 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -94,13 +94,13 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -111,7 +111,7 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
@@ -165,7 +165,7 @@ describe '[EE] Private Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:maintainer
).
of
(
project
)
}
...
...
ee/spec/features/security/project/public_access_spec.rb
View file @
eb6c0202
...
...
@@ -32,13 +32,13 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -50,7 +50,7 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
...
...
@@ -139,7 +139,7 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -177,19 +177,19 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:auditor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -200,7 +200,7 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_allowed_for
(
:auditor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
@@ -234,7 +234,7 @@ describe '[EE] Public Project Access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:maintainer
).
of
(
project
)
}
...
...
spec/features/security/group/internal_access_spec.rb
View file @
eb6c0202
...
...
@@ -36,7 +36,7 @@ describe 'Internal Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -51,7 +51,7 @@ describe 'Internal Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:internal
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -68,7 +68,7 @@ describe 'Internal Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -83,7 +83,7 @@ describe 'Internal Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
spec/features/security/group/private_access_spec.rb
View file @
eb6c0202
...
...
@@ -36,7 +36,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -51,7 +51,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -68,7 +68,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -83,7 +83,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
spec/features/security/group/public_access_spec.rb
View file @
eb6c0202
...
...
@@ -36,7 +36,7 @@ describe 'Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
'GET /groups/:path/issues'
do
describe
'GET /groups/:path/
-/
issues'
do
subject
{
issues_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -51,7 +51,7 @@ describe 'Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
'GET /groups/:path/merge_requests'
do
describe
'GET /groups/:path/
-/
merge_requests'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
,
group:
group
)
}
subject
{
merge_requests_group_path
(
group
)
}
...
...
@@ -68,7 +68,7 @@ describe 'Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/
-/
group_members'
do
subject
{
group_group_members_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -83,7 +83,7 @@ describe 'Public Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
'GET /groups/:path/edit'
do
describe
'GET /groups/:path/
-/
edit'
do
subject
{
edit_group_path
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
spec/features/security/project/internal_access_spec.rb
View file @
eb6c0202
...
...
@@ -29,7 +29,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -43,7 +43,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -57,7 +57,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/commit/:sha"
do
describe
"GET /:project_path/
-/
commit/:sha"
do
subject
{
project_commit_path
(
project
,
project
.
repository
.
commit
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -71,7 +71,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -127,7 +127,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -229,7 +229,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -243,7 +243,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -257,7 +257,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -278,7 +278,7 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
spec/features/security/project/private_access_spec.rb
View file @
eb6c0202
...
...
@@ -29,7 +29,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -43,7 +43,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -57,7 +57,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/commit/:sha"
do
describe
"GET /:project_path/
-/
commit/:sha"
do
subject
{
project_commit_path
(
project
,
project
.
repository
.
commit
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -71,7 +71,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -127,7 +127,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -215,7 +215,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -229,7 +229,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -250,7 +250,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
spec/features/security/project/public_access_spec.rb
View file @
eb6c0202
...
...
@@ -29,7 +29,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/tree/master"
do
describe
"GET /:project_path/
-/
tree/master"
do
subject
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -43,7 +43,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/commits/master"
do
describe
"GET /:project_path/
-/
commits/master"
do
subject
{
project_commits_path
(
project
,
project
.
repository
.
root_ref
,
limit:
1
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -57,7 +57,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/commit/:sha"
do
describe
"GET /:project_path/
-/
commit/:sha"
do
subject
{
project_commit_path
(
project
,
project
.
repository
.
commit
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -71,7 +71,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/compare"
do
describe
"GET /:project_path/
-/
compare"
do
subject
{
project_compare_index_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -345,7 +345,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/blob"
do
describe
"GET /:project_path/
-/
blob"
do
let
(
:commit
)
{
project
.
repository
.
commit
}
subject
{
project_blob_path
(
project
,
File
.
join
(
commit
.
id
,
'.gitignore'
))
}
...
...
@@ -446,7 +446,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests"
do
describe
"GET /:project_path/
-/
merge_requests"
do
subject
{
project_merge_requests_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -460,7 +460,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/merge_requests/new"
do
describe
"GET /:project_path/
-/
merge_requests/new"
do
subject
{
project_new_merge_request_path
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
...
...
@@ -474,7 +474,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/branches"
do
describe
"GET /:project_path/
-/
branches"
do
subject
{
project_branches_path
(
project
)
}
before
do
...
...
@@ -495,7 +495,7 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:visitor
)
}
end
describe
"GET /:project_path/tags"
do
describe
"GET /:project_path/
-/
tags"
do
subject
{
project_tags_path
(
project
)
}
before
do
...
...
spec/routing/project_routing_spec.rb
View file @
eb6c0202
...
...
@@ -577,7 +577,7 @@ describe 'project routing' do
end
end
# project_blob GET /:project_id/blob/:id(.:format) blob#show {id: /[^\0]+/, project_id: /[^\/]+/}
# project_blob GET /:project_id/
-/
blob/:id(.:format) blob#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe
Projects
::
BlobController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/-/blob/master/app/models/project.rb'
)).
to
route_to
(
'projects/blob#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/project.rb'
)
...
...
@@ -600,7 +600,7 @@ describe 'project routing' do
end
end
# project_tree GET /:project_id/tree/:id(.:format) tree#show {id: /[^\0]+/, project_id: /[^\/]+/}
# project_tree GET /:project_id/
-/
tree/:id(.:format) tree#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe
Projects
::
TreeController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/-/tree/master/app/models/project.rb'
)).
to
route_to
(
'projects/tree#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/project.rb'
)
...
...
@@ -621,8 +621,8 @@ describe 'project routing' do
end
end
# project_find_file GET /:namespace_id/:project_id/find_file/*id(.:format) projects/find_file#show {:id=>/[^\0]+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/html/}
# project_files GET /:namespace_id/:project_id/files/*id(.:format) projects/find_file#list {:id=>/(?:[^.]|\.(?!json$))+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/json/}
# project_find_file GET /:namespace_id/:project_id/
-/
find_file/*id(.:format) projects/find_file#show {:id=>/[^\0]+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/html/}
# project_files GET /:namespace_id/:project_id/
-/
files/*id(.:format) projects/find_file#list {:id=>/(?:[^.]|\.(?!json$))+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/json/}
describe
Projects
::
FindFileController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/-/find_file/master'
)).
to
route_to
(
'projects/find_file#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
)
...
...
@@ -677,7 +677,7 @@ describe 'project routing' do
end
end
# project_raw GET /:project_id/raw/:id(.:format) raw#show {id: /[^\0]+/, project_id: /[^\/]+/}
# project_raw GET /:project_id/
-/
raw/:id(.:format) raw#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe
Projects
::
RawController
,
'routing'
do
it
'to #show'
do
newline_file
=
"new
\n\n
line.txt"
...
...
@@ -694,9 +694,9 @@ describe 'project routing' do
end
end
# project_compare_index GET /:project_id/compare(.:format) compare#index {id: /[^\/]+/, project_id: /[^\/]+/}
# POST /:project_id/compare(.:format) compare#create {id: /[^\/]+/, project_id: /[^\/]+/}
# project_compare /:project_id/compare/:from...:to(.:format) compare#show {from: /.+/, to: /.+/, id: /[^\/]+/, project_id: /[^\/]+/}
# project_compare_index GET /:project_id/
-/
compare(.:format) compare#index {id: /[^\/]+/, project_id: /[^\/]+/}
# POST /:project_id/
-/
compare(.:format) compare#create {id: /[^\/]+/, project_id: /[^\/]+/}
# project_compare /:project_id/
-/
compare/:from...:to(.:format) compare#show {from: /.+/, to: /.+/, id: /[^\/]+/, project_id: /[^\/]+/}
describe
Projects
::
CompareController
,
'routing'
do
it
'to #index'
do
expect
(
get
(
'/gitlab/gitlabhq/-/compare'
)).
to
route_to
(
'projects/compare#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment