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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
bcdc7b5d
Commit
bcdc7b5d
authored
Sep 25, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group security tests
parent
2f634297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
spec/features/security/group_access_spec.rb
spec/features/security/group_access_spec.rb
+83
-0
No files found.
spec/features/security/group_access_spec.rb
0 → 100644
View file @
bcdc7b5d
require
'spec_helper'
describe
"Group access"
do
describe
"GET /projects/new"
do
it
{
new_group_path
.
should
be_allowed_for
:admin
}
it
{
new_group_path
.
should
be_allowed_for
:user
}
it
{
new_group_path
.
should
be_denied_for
:visitor
}
end
describe
"Group"
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:master
)
{
create
(
:user
)
}
let
(
:reporter
)
{
create
(
:user
)
}
let
(
:guest
)
{
create
(
:user
)
}
before
do
group
.
add_user
(
master
,
Gitlab
::
Access
::
MASTER
)
group
.
add_user
(
reporter
,
Gitlab
::
Access
::
REPORTER
)
group
.
add_user
(
guest
,
Gitlab
::
Access
::
GUEST
)
end
describe
"GET /groups/:path"
do
subject
{
group_path
(
group
)
}
it
{
should
be_allowed_for
group
.
owner
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /groups/:path/issues"
do
subject
{
issues_group_path
(
group
)
}
it
{
should
be_allowed_for
group
.
owner
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /groups/:path/merge_requests"
do
subject
{
merge_requests_group_path
(
group
)
}
it
{
should
be_allowed_for
group
.
owner
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /groups/:path/members"
do
subject
{
members_group_path
(
group
)
}
it
{
should
be_allowed_for
group
.
owner
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /groups/:path/edit"
do
subject
{
edit_group_path
(
group
)
}
it
{
should
be_allowed_for
group
.
owner
}
it
{
should
be_denied_for
master
}
it
{
should
be_denied_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_denied_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
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