Commit bfe77277 authored by Jarka Kadlecova's avatar Jarka Kadlecova

Raise exception if group not found/not readable by a user

parent 4b522a89
......@@ -4,8 +4,7 @@ class EpicsFinder < IssuableFinder
end
def execute
raise ArgumentError, 'group_id argument is missing' unless params[:group_id]
return [] unless group
raise ArgumentError, 'group_id argument is missing' unless group
items = init_collection
items = by_created_at(items)
......
......@@ -30,7 +30,10 @@ module EE
enable :destroy_epic
end
rule { auditor }.enable :read_group
rule { auditor }.policy do
enable :read_group
enable :read_epic
end
rule { admin }.enable :read_epic
rule { has_projects }.enable :read_epic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment