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
Boxiang Sun
gitlab-ce
Commits
883d1dab
Commit
883d1dab
authored
Aug 01, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec failures with namespace helpers
parent
972b0c4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/helpers/namespaces_helper.rb
app/helpers/namespaces_helper.rb
+2
-2
No files found.
app/helpers/namespaces_helper.rb
View file @
883d1dab
...
...
@@ -9,7 +9,7 @@ module NamespacesHelper
.
includes
(
:route
)
.
order
(
'routes.path'
)
users
=
[
current_user
.
namespace
]
selected_id
=
current_user
.
namespace
.
i
d
selected_id
=
selecte
d
unless
extra_group
.
nil?
||
extra_group
.
is_a?
(
Group
)
extra_group
=
Group
.
find
(
extra_group
)
if
Namespace
.
find
(
extra_group
).
kind
==
'group'
...
...
@@ -25,7 +25,7 @@ module NamespacesHelper
if
Ability
.
allowed?
(
current_user
,
:read_group
,
extra_group
)
# Assign the value to an invalid primary ID so that the select box works
extra_group
.
id
=
-
1
if
!
extra_group
.
persisted?
extra_group
.
id
=
-
1
unless
extra_group
.
persisted?
selected_id
=
extra_group
.
id
if
selected
==
:extra_group
groups
|=
[
extra_group
]
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