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
05e0c8ab
Commit
05e0c8ab
authored
Sep 09, 2020
by
Małgorzata Ksionek
Committed by
Jan Provaznik
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update factory call
parent
98c93037
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
13 deletions
+13
-13
ee/spec/models/group_spec.rb
ee/spec/models/group_spec.rb
+1
-1
spec/finders/group_members_finder_spec.rb
spec/finders/group_members_finder_spec.rb
+1
-1
spec/finders/groups_finder_spec.rb
spec/finders/groups_finder_spec.rb
+1
-1
spec/finders/members_finder_spec.rb
spec/finders/members_finder_spec.rb
+1
-1
spec/lib/gitlab/project_authorizations_spec.rb
spec/lib/gitlab/project_authorizations_spec.rb
+4
-4
spec/models/group_spec.rb
spec/models/group_spec.rb
+1
-1
spec/models/member_spec.rb
spec/models/member_spec.rb
+1
-1
spec/services/authorized_project_update/project_create_service_spec.rb
.../authorized_project_update/project_create_service_spec.rb
+2
-2
spec/services/authorized_project_update/project_group_link_create_service_spec.rb
..._project_update/project_group_link_create_service_spec.rb
+1
-1
No files found.
ee/spec/models/group_spec.rb
View file @
05e0c8ab
...
@@ -714,7 +714,7 @@ RSpec.describe Group do
...
@@ -714,7 +714,7 @@ RSpec.describe Group do
context
'with `minimal_access_role` licensed'
do
context
'with `minimal_access_role` licensed'
do
before
do
before
do
stub_licensed_features
(
minimal_access_role:
true
)
stub_licensed_features
(
minimal_access_role:
true
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
group
)
end
end
context
'when group is a subgroup'
do
context
'when group is a subgroup'
do
...
...
spec/finders/group_members_finder_spec.rb
View file @
05e0c8ab
...
@@ -16,7 +16,7 @@ RSpec.describe GroupMembersFinder, '#execute' do
...
@@ -16,7 +16,7 @@ RSpec.describe GroupMembersFinder, '#execute' do
member1
=
group
.
add_maintainer
(
user1
)
member1
=
group
.
add_maintainer
(
user1
)
member2
=
group
.
add_maintainer
(
user2
)
member2
=
group
.
add_maintainer
(
user2
)
member3
=
group
.
add_maintainer
(
user3
)
member3
=
group
.
add_maintainer
(
user3
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
source
:
group
)
result
=
described_class
.
new
(
group
).
execute
result
=
described_class
.
new
(
group
).
execute
...
...
spec/finders/groups_finder_spec.rb
View file @
05e0c8ab
...
@@ -153,7 +153,7 @@ RSpec.describe GroupsFinder do
...
@@ -153,7 +153,7 @@ RSpec.describe GroupsFinder do
context
'being minimal access member of parent group'
do
context
'being minimal access member of parent group'
do
it
'do not return group with minimal_access access'
do
it
'do not return group with minimal_access access'
do
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
parent_group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
parent_group
)
is_expected
.
to
contain_exactly
(
public_subgroup
,
internal_subgroup
)
is_expected
.
to
contain_exactly
(
public_subgroup
,
internal_subgroup
)
end
end
...
...
spec/finders/members_finder_spec.rb
View file @
05e0c8ab
...
@@ -50,7 +50,7 @@ RSpec.describe MembersFinder, '#execute' do
...
@@ -50,7 +50,7 @@ RSpec.describe MembersFinder, '#execute' do
member1
=
group
.
add_maintainer
(
user2
)
member1
=
group
.
add_maintainer
(
user2
)
member2
=
nested_group
.
add_maintainer
(
user3
)
member2
=
nested_group
.
add_maintainer
(
user3
)
member3
=
project
.
add_maintainer
(
user4
)
member3
=
project
.
add_maintainer
(
user4
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
source
:
group
)
result
=
described_class
.
new
(
project
,
user2
).
execute
result
=
described_class
.
new
(
project
,
user2
).
execute
...
...
spec/lib/gitlab/project_authorizations_spec.rb
View file @
05e0c8ab
...
@@ -125,7 +125,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
...
@@ -125,7 +125,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
let!
(
:group_project
)
{
create
(
:project
,
namespace:
group
)
}
let!
(
:group_project
)
{
create
(
:project
,
namespace:
group
)
}
before
do
before
do
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
group
)
end
end
it
'does not create authorization'
do
it
'does not create authorization'
do
...
@@ -138,7 +138,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
...
@@ -138,7 +138,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
let!
(
:sub_group_project
)
{
create
(
:project
,
namespace:
sub_group
)
}
let!
(
:sub_group_project
)
{
create
(
:project
,
namespace:
sub_group
)
}
before
do
before
do
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
group
)
end
end
it
'does not create authorization'
do
it
'does not create authorization'
do
...
@@ -152,7 +152,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
...
@@ -152,7 +152,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
before
do
before
do
create
(
:group_group_link
,
shared_group:
shared_group
,
shared_with_group:
group
)
create
(
:group_group_link
,
shared_group:
shared_group
,
shared_with_group:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
group
)
end
end
it
'does not create authorization'
do
it
'does not create authorization'
do
...
@@ -166,7 +166,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
...
@@ -166,7 +166,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
before
do
before
do
create
(
:project_group_link
,
group:
group
,
project:
shared_project
)
create
(
:project_group_link
,
group:
group
,
project:
shared_project
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
user
,
source
:
group
)
end
end
it
'does not create authorization'
do
it
'does not create authorization'
do
...
...
spec/models/group_spec.rb
View file @
05e0c8ab
...
@@ -692,7 +692,7 @@ RSpec.describe Group do
...
@@ -692,7 +692,7 @@ RSpec.describe Group do
before
do
before
do
create
(
:group_member
,
user:
user
,
group:
group_parent
,
access_level:
parent_group_access_level
)
create
(
:group_member
,
user:
user
,
group:
group_parent
,
access_level:
parent_group_access_level
)
create
(
:group_member
,
user:
user
,
group:
group
,
access_level:
group_access_level
)
create
(
:group_member
,
user:
user
,
group:
group
,
access_level:
group_access_level
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
create
(
:user
),
source
:
group
)
create
(
:group_member
,
user:
user
,
group:
group_child
,
access_level:
child_group_access_level
)
create
(
:group_member
,
user:
user
,
group:
group_child
,
access_level:
child_group_access_level
)
end
end
...
...
spec/models/member_spec.rb
View file @
05e0c8ab
...
@@ -149,7 +149,7 @@ RSpec.describe Member do
...
@@ -149,7 +149,7 @@ RSpec.describe Member do
accepted_request_user
=
create
(
:user
).
tap
{
|
u
|
project
.
request_access
(
u
)
}
accepted_request_user
=
create
(
:user
).
tap
{
|
u
|
project
.
request_access
(
u
)
}
@accepted_request_member
=
project
.
requesters
.
find_by
(
user_id:
accepted_request_user
.
id
).
tap
{
|
m
|
m
.
accept_request
}
@accepted_request_member
=
project
.
requesters
.
find_by
(
user_id:
accepted_request_user
.
id
).
tap
{
|
m
|
m
.
accept_request
}
@member_with_minimal_access
=
create
(
:group_member
,
:minimal_access
,
group
:
group
)
@member_with_minimal_access
=
create
(
:group_member
,
:minimal_access
,
source
:
group
)
end
end
describe
'.access_for_user_ids'
do
describe
'.access_for_user_ids'
do
...
...
spec/services/authorized_project_update/project_create_service_spec.rb
View file @
05e0c8ab
...
@@ -81,7 +81,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
...
@@ -81,7 +81,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
before
do
before
do
create
(
:group_member
,
access_level:
Gitlab
::
Access
::
REPORTER
,
group:
group
,
user:
group_user
)
create
(
:group_member
,
access_level:
Gitlab
::
Access
::
REPORTER
,
group:
group
,
user:
group_user
)
create
(
:group_member
,
access_level:
Gitlab
::
Access
::
MAINTAINER
,
group:
shared_with_group
,
user:
group_user
)
create
(
:group_member
,
access_level:
Gitlab
::
Access
::
MAINTAINER
,
group:
shared_with_group
,
user:
group_user
)
create
(
:group_member
,
:minimal_access
,
group
:
shared_with_group
,
user:
create
(
:user
))
create
(
:group_member
,
:minimal_access
,
source
:
shared_with_group
,
user:
create
(
:user
))
create
(
:group_group_link
,
shared_group:
group
,
shared_with_group:
shared_with_group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
create
(
:group_group_link
,
shared_group:
group
,
shared_with_group:
shared_with_group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
...
@@ -126,7 +126,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
...
@@ -126,7 +126,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do
context
'member with minimal access'
do
context
'member with minimal access'
do
before
do
before
do
create
(
:group_member
,
:minimal_access
,
user:
group_user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
group_user
,
source
:
group
)
end
end
it
'does not create project authorization'
do
it
'does not create project authorization'
do
...
...
spec/services/authorized_project_update/project_group_link_create_service_spec.rb
View file @
05e0c8ab
...
@@ -114,7 +114,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectGroupLinkCreateService do
...
@@ -114,7 +114,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectGroupLinkCreateService do
context
'minimal access member'
do
context
'minimal access member'
do
before
do
before
do
create
(
:group_member
,
:minimal_access
,
user:
group_user
,
group
:
group
)
create
(
:group_member
,
:minimal_access
,
user:
group_user
,
source
:
group
)
end
end
it
'does not create project authorization'
do
it
'does not create project authorization'
do
...
...
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