From f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Tue, 1 Mar 2016 12:22:29 -0300 Subject: Add permission level to groups --- app/helpers/groups_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/helpers/groups_helper.rb') diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 1d36969cd62..b1f0a765bb9 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -19,6 +19,10 @@ module GroupsHelper end end + def can_change_group_visibility_level?(group) + can?(current_user, :change_visibility_level, group) + end + def group_icon(group) if group.is_a?(String) group = Group.find_by(path: group) -- cgit v1.2.1