summaryrefslogtreecommitdiff
path: root/app/helpers/namespaces_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/namespaces_helper.rb')
-rw-r--r--app/helpers/namespaces_helper.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb
index a9a6c78654f..69ad3de5031 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -1,13 +1,7 @@
module NamespacesHelper
def namespaces_options(selected = :current_user, scope = :default)
- if current_user.admin
- groups = Group.all
- users = Namespace.root
- else
- groups = current_user.owned_groups.select {|n| n.type == 'Group'}
- users = current_user.namespaces.reject {|n| n.type == 'Group'}
- end
-
+ groups = current_user.owned_groups.select {|n| n.type == 'Group'}
+ users = current_user.namespaces.reject {|n| n.type == 'Group'}
global_opts = ["Global", [['/', Namespace.global_id]] ]
group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]