Add callout priority enum

This commit is contained in:
Matija Čupić 2018-02-01 21:02:07 +01:00
parent 4cfe66ae5f
commit 4ff0cfe541
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,11 @@
module CalloutsHelper
GKE_CLUSTER_INTEGRATION = 'gke_cluster_integration'.freeze
# Higher value = higher priority
PRIORITY = {
GKE_CLUSTER_INTEGRATION: 0
}.freeze
def show_gke_cluster_integration_callout?(project)
current_user && !user_dismissed?(GKE_CLUSTER_INTEGRATION) &&
(project.team.master?(current_user) ||