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
4f1bb91a
Commit
4f1bb91a
authored
Sep 15, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix finder and tests for new membership models
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
6558e52d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
app/finders/projects_finder.rb
app/finders/projects_finder.rb
+1
-1
features/steps/admin/groups.rb
features/steps/admin/groups.rb
+1
-1
features/steps/group/group.rb
features/steps/group/group.rb
+1
-1
features/steps/project/team_management.rb
features/steps/project/team_management.rb
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+1
-1
No files found.
app/finders/projects_finder.rb
View file @
4f1bb91a
...
@@ -32,7 +32,7 @@ class ProjectsFinder
...
@@ -32,7 +32,7 @@ class ProjectsFinder
#
#
group
.
projects
.
where
(
group
.
projects
.
where
(
"projects.id IN (?) OR projects.visibility_level IN (?)"
,
"projects.id IN (?) OR projects.visibility_level IN (?)"
,
projects_members
.
pluck
(
:
project
_id
),
projects_members
.
pluck
(
:
source
_id
),
Project
.
public_and_internal_levels
Project
.
public_and_internal_levels
)
)
else
else
...
...
features/steps/admin/groups.rb
View file @
4f1bb91a
...
@@ -40,7 +40,7 @@ class AdminGroups < Spinach::FeatureSteps
...
@@ -40,7 +40,7 @@ class AdminGroups < Spinach::FeatureSteps
user
=
User
.
find_by
(
name:
"John Doe"
)
user
=
User
.
find_by
(
name:
"John Doe"
)
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
within
"#new_team_member"
do
within
"#new_team_member"
do
select
"Reporter"
,
from:
"
group_access
"
select
"Reporter"
,
from:
"
access_level
"
end
end
click_button
"Add users into group"
click_button
"Add users into group"
end
end
...
...
features/steps/group/group.rb
View file @
4f1bb91a
...
@@ -32,7 +32,7 @@ class Groups < Spinach::FeatureSteps
...
@@ -32,7 +32,7 @@ class Groups < Spinach::FeatureSteps
click_link
'Add members'
click_link
'Add members'
within
".users-group-form"
do
within
".users-group-form"
do
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select
"Reporter"
,
from:
"
group_access
"
select
"Reporter"
,
from:
"
access_level
"
end
end
click_button
"Add users into group"
click_button
"Add users into group"
end
end
...
...
features/steps/project/team_management.rb
View file @
4f1bb91a
...
@@ -23,7 +23,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps
...
@@ -23,7 +23,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps
user
=
User
.
find_by
(
name:
"Mike"
)
user
=
User
.
find_by
(
name:
"Mike"
)
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
within
"#new_
team
_member"
do
within
"#new_
project
_member"
do
select
"Reporter"
,
from:
"access_level"
select
"Reporter"
,
from:
"access_level"
end
end
click_button
"Add users"
click_button
"Add users"
...
...
lib/api/entities.rb
View file @
4f1bb91a
...
@@ -68,7 +68,7 @@ module API
...
@@ -68,7 +68,7 @@ module API
class
GroupMember
<
UserBasic
class
GroupMember
<
UserBasic
expose
:access_level
do
|
user
,
options
|
expose
:access_level
do
|
user
,
options
|
options
[
:group
].
group_members
.
find_by
(
user_id:
user
.
id
).
group_access
options
[
:group
].
group_members
.
find_by
(
user_id:
user
.
id
).
access_level
end
end
end
end
...
...
spec/mailers/notify_spec.rb
View file @
4f1bb91a
...
@@ -506,7 +506,7 @@ describe Notify do
...
@@ -506,7 +506,7 @@ describe Notify do
describe
'group access changed'
do
describe
'group access changed'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:membership
)
{
create
(
:
users_group
,
group:
group
,
user:
user
)
}
let
(
:membership
)
{
create
(
:
group_member
,
group:
group
,
user:
user
)
}
subject
{
Notify
.
group_access_granted_email
(
membership
.
id
)
}
subject
{
Notify
.
group_access_granted_email
(
membership
.
id
)
}
...
...
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