diff options
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r-- | app/helpers/groups_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index eb80acd869f..06a52457fd6 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -167,8 +167,23 @@ module GroupsHelper @group.packages_feature_enabled? end + def show_invite_banner?(group) + Feature.enabled?(:invite_your_teammates_banner_a, group) && + can?(current_user, :admin_group, group) && + !just_created? && + !multiple_members?(group) + end + private + def just_created? + flash[:notice] =~ /successfully created/ + end + + def multiple_members?(group) + group.member_count > 1 + end + def get_group_sidebar_links links = [:overview, :group_members] |