summaryrefslogtreecommitdiffstats
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-28 14:51:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-28 14:51:08 +0000
commit7e7ac5340a281ed767066af0b5f4dd45a3d7076f (patch)
tree891640b0548c0d3063daddb219006d120fa312c3 /app/controllers/groups_controller.rb
parent9a7fb0ad7be0ee3403f5b89eb0c16b68c991d519 (diff)
downloadredmine-7e7ac5340a281ed767066af0b5f4dd45a3d7076f.tar.gz
redmine-7e7ac5340a281ed767066af0b5f4dd45a3d7076f.zip
Adds buit-in groups to give specific permissions to anonymous and non members users per project (#17976).
git-svn-id: http://svn.redmine.org/redmine/trunk@13417 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 0cd4055e5..555fc61df 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -25,12 +25,16 @@ class GroupsController < ApplicationController
helper :custom_fields
def index
- @groups = Group.sorted.all
respond_to do |format|
format.html {
+ @groups = Group.sorted.all
@user_count_by_group_id = user_count_by_group_id
}
- format.api
+ format.api {
+ scope = Group.sorted
+ scope = scope.givable unless params[:builtin] == '1'
+ @groups = scope.all
+ }
end
end