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
9a33eebf
Commit
9a33eebf
authored
May 26, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE-specific lines of security specs into EE directory
Add frozen string literal, move specs.
parent
16f7bf44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
11 deletions
+76
-11
ee/spec/features/security/admin_access_spec.rb
ee/spec/features/security/admin_access_spec.rb
+25
-0
ee/spec/features/security/dashboard_access_spec.rb
ee/spec/features/security/dashboard_access_spec.rb
+51
-0
spec/features/security/admin_access_spec.rb
spec/features/security/admin_access_spec.rb
+0
-3
spec/features/security/dashboard_access_spec.rb
spec/features/security/dashboard_access_spec.rb
+0
-8
No files found.
ee/spec/features/security/admin_access_spec.rb
0 → 100644
View file @
9a33eebf
# frozen_string_literal: true
require
'spec_helper'
describe
"Admin::Projects"
do
include
AccessMatchers
describe
"GET /admin/projects"
do
subject
{
admin_projects_path
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
describe
"GET /admin/users"
do
subject
{
admin_users_path
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
describe
"GET /admin/hooks"
do
subject
{
admin_hooks_path
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
end
ee/spec/features/security/dashboard_access_spec.rb
0 → 100644
View file @
9a33eebf
# frozen_string_literal: true
require
'spec_helper'
describe
"Dashboard access"
do
include
AccessMatchers
describe
"GET /dashboard"
do
subject
{
dashboard_projects_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
describe
"GET /dashboard/issues"
do
subject
{
issues_dashboard_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
describe
"GET /dashboard/merge_requests"
do
subject
{
merge_requests_dashboard_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
describe
"GET /dashboard/projects/starred"
do
subject
{
starred_dashboard_projects_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
describe
"GET /help"
do
subject
{
help_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
describe
"GET /projects/new"
do
it
{
expect
(
new_project_path
).
to
be_allowed_for
:auditor
}
end
describe
"GET /groups/new"
do
it
{
expect
(
new_group_path
).
to
be_allowed_for
:auditor
}
end
describe
"GET /profile/groups"
do
subject
{
dashboard_groups_path
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
end
end
spec/features/security/admin_access_spec.rb
View file @
9a33eebf
...
...
@@ -9,7 +9,6 @@ describe "Admin::Projects" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_denied_for
:user
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
describe
"GET /admin/users"
do
...
...
@@ -18,7 +17,6 @@ describe "Admin::Projects" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_denied_for
:user
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
describe
"GET /admin/hooks"
do
...
...
@@ -27,6 +25,5 @@ describe "Admin::Projects" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_denied_for
:user
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
it
{
is_expected
.
to
be_denied_for
:auditor
}
end
end
spec/features/security/dashboard_access_spec.rb
View file @
9a33eebf
...
...
@@ -8,7 +8,6 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
...
...
@@ -17,7 +16,6 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
...
...
@@ -26,7 +24,6 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
...
...
@@ -35,7 +32,6 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
...
...
@@ -44,21 +40,18 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_allowed_for
:visitor
}
end
describe
"GET /projects/new"
do
it
{
expect
(
new_project_path
).
to
be_allowed_for
:admin
}
it
{
expect
(
new_project_path
).
to
be_allowed_for
:user
}
it
{
expect
(
new_project_path
).
to
be_allowed_for
:auditor
}
it
{
expect
(
new_project_path
).
to
be_denied_for
:visitor
}
end
describe
"GET /groups/new"
do
it
{
expect
(
new_group_path
).
to
be_allowed_for
:admin
}
it
{
expect
(
new_group_path
).
to
be_allowed_for
:user
}
it
{
expect
(
new_group_path
).
to
be_allowed_for
:auditor
}
it
{
expect
(
new_group_path
).
to
be_denied_for
:visitor
}
end
...
...
@@ -67,7 +60,6 @@ describe "Dashboard access" do
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
it
{
is_expected
.
to
be_allowed_for
:auditor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
end
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