padma-assets 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 856bdd472b827470988adcaee5e9ff2418d97ee2
|
4
|
+
data.tar.gz: 723a3d940d839bf9ecfd50abfa4a4e2e59454337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40eb5004bded6ed069cb9c0db4e2a174db41e9d8c3a8693f377b3240a594b11906fe01ffa395109ffebad90ac1b59b93d487c43dce196a7c7d92abf2fd1459b7
|
7
|
+
data.tar.gz: 3ead87d490809153a6be575295583618681f064e4c6814a36625f6bd05b2ac450530bf30e23076eeb5618d4dd4bd6b34ed3fbf0c95f5959cd489c0c2e8ab609b
|
@@ -3,7 +3,10 @@ class GeneralAbility
|
|
3
3
|
|
4
4
|
def initialize(user)
|
5
5
|
if alpha?(user)
|
6
|
-
can :
|
6
|
+
can :see, :mailchimp
|
7
|
+
if petal_enabled?(user,'mailchimp')
|
8
|
+
can :configure, :mailchimp
|
9
|
+
end
|
7
10
|
can :manage, :planning
|
8
11
|
end
|
9
12
|
|
@@ -34,6 +37,10 @@ class GeneralAbility
|
|
34
37
|
user.current_account.padma
|
35
38
|
end
|
36
39
|
end
|
40
|
+
|
41
|
+
def petal_enabled?(user,petal_name)
|
42
|
+
petal_name.in?(padma_account(user).enabled_petals||[])
|
43
|
+
end
|
37
44
|
|
38
45
|
def alpha?(user)
|
39
46
|
user.account_tester_level == 'alpha'
|
@@ -2,6 +2,6 @@
|
|
2
2
|
<li><%= link_to t('header-menu.mailing.triggers'), "#{APP_CONFIG['mailing-url']}/triggers" %></li>
|
3
3
|
<li><%= link_to t('header-menu.mailing.scheduled_mails_all'), "#{APP_CONFIG['mailing-url']}/scheduled_mails/history" %></li>
|
4
4
|
<li><%= link_to t('header-menu.mailing.scheduled_mails_future'), "#{APP_CONFIG['mailing-url']}/scheduled_mails/pending" %></li>
|
5
|
-
<% if
|
5
|
+
<% if can? :configure, :mailchimp -%>
|
6
6
|
<li><%= link_to t('header-menu.mailing.mailchimp_configuration'), "#{APP_CONFIG['mailing-url']}/mailchimp/configuration" %></li>
|
7
7
|
<% end -%>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
<% if can?(:manage,:planning) -%>
|
51
51
|
<li><%= link_to t('header-menu.modules.planning'), APP_CONFIG['planning-url'] %></li>
|
52
52
|
<% end -%>
|
53
|
-
<% if can?(:
|
53
|
+
<% if can?(:see, :mailchimp) -%>
|
54
54
|
<li><%= link_to t('header-menu.modules.mailchimp_integration'), "#{APP_CONFIG['mailing-url']}/mailchimp/subscription" %></li>
|
55
55
|
<% end -%>
|
56
56
|
<% if can?(:manage, :derose_events) -%>
|