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
e1e0b763
Commit
e1e0b763
authored
Apr 24, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deployments security check path and add checks for internal and public access
parent
6dab3033
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+15
-0
spec/features/security/project/private_access_spec.rb
spec/features/security/project/private_access_spec.rb
+1
-1
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+15
-0
No files found.
spec/features/security/project/internal_access_spec.rb
View file @
e1e0b763
...
...
@@ -428,6 +428,21 @@ describe "Internal Project Access", feature: true do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/environments/:id/deployments"
do
let
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
subject
{
namespace_project_environment_deployments_path
(
project
.
namespace
,
project
,
environment
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:master
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/environments/new"
do
subject
{
new_namespace_project_environment_path
(
project
.
namespace
,
project
)
}
...
...
spec/features/security/project/private_access_spec.rb
View file @
e1e0b763
...
...
@@ -419,7 +419,7 @@ describe "Private Project Access", feature: true do
describe
"GET /:project_path/environments/:id/deployments"
do
let
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
subject
{
namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
)
}
subject
{
namespace_project_environment_
deployments_
path
(
project
.
namespace
,
project
,
environment
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
...
...
spec/features/security/project/public_access_spec.rb
View file @
e1e0b763
...
...
@@ -248,6 +248,21 @@ describe "Public Project Access", feature: true do
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/environments/:id/deployments"
do
let
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
subject
{
namespace_project_environment_deployments_path
(
project
.
namespace
,
project
,
environment
)
}
it
{
is_expected
.
to
be_allowed_for
(
:admin
)
}
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:master
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
describe
"GET /:project_path/environments/new"
do
subject
{
new_namespace_project_environment_path
(
project
.
namespace
,
project
)
}
...
...
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