decidim-assemblies 0.12.0 → 0.12.1

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
  SHA256:
3
- metadata.gz: 6e5b79a99b95b114ef968e595c222671779ba4c4045abcbaa043cba757005525
4
- data.tar.gz: b4905c7afbacf8fa19456d70979ca731731f2bf4f0163c696009232a6f8dd233
3
+ metadata.gz: e9ee3cf8dafb59bd5060167bc779b01068d0c98109413abf21bbe0b32d798ec3
4
+ data.tar.gz: 52c90e9a972f61f44cfa4ae3de0d5f2b8f82e85a5b6916b664dcb9796b07ec25
5
5
  SHA512:
6
- metadata.gz: 3d531ae5dceeb96afb4f122b121f0287ace1818d9b7f8e63fe2dd2b88bb58b78e537118e34975af8211d5cb92d9b621acdd6c78ef018da7adfaff2ec705f3ac6
7
- data.tar.gz: a77628666e8a02e707275b3b92441940333f276c8c840e113a8931bd3bf99f64c50912a861268ba3efeee2477ce9254eb049cb820086b5e9ebd5447803489881
6
+ metadata.gz: 0d7fdca881da71b04c168459be388fdaa45656337a62732d6fecfd4debe1917d79a0f379a7642492c370654a6a270d0b0a979338982684a46f2b12d00a4b13ed
7
+ data.tar.gz: 573b0fcbe4f3e797afe215cf3d32f21df2aaf5d516bd07fc9ef4b718ec6dd1eec17f16359a37ad32b28eee0c681f6ecc3e2c16f6f3d797a349a87096c2c58020
@@ -8,6 +8,11 @@ module Decidim
8
8
 
9
9
  return permission_action if assembly && !assembly.is_a?(Decidim::Assembly)
10
10
 
11
+ if read_admin_dashboard_action?
12
+ user_can_read_admin_dashboard?
13
+ return permission_action
14
+ end
15
+
11
16
  if permission_action.scope == :public
12
17
  public_list_assemblies_action?
13
18
  public_read_assembly_action?
@@ -23,11 +28,6 @@ module Decidim
23
28
  end
24
29
  return permission_action unless permission_action.scope == :admin
25
30
 
26
- if read_admin_dashboard_action?
27
- user_can_read_admin_dashboard?
28
- return permission_action
29
- end
30
-
31
31
  user_can_read_assembly_list?
32
32
  user_can_read_current_assembly?
33
33
  user_can_create_assembly?
@@ -192,7 +192,8 @@ module Decidim
192
192
  :moderation,
193
193
  :assembly,
194
194
  :assembly_user_role,
195
- :assembly_member
195
+ :assembly_member,
196
+ :space_private_user
196
197
  ].include?(permission_action.subject)
197
198
  allow! if is_allowed
198
199
  end
@@ -6,7 +6,7 @@
6
6
  <%= aria_selected_link_to t("info", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.edit_assembly_path(current_participatory_space) %>
7
7
  </li>
8
8
  <% end %>
9
- <% if allowed_to? :read, :component %>
9
+ <% if allowed_to? :read, :component, assembly: current_participatory_space %>
10
10
  <li <% if is_active_link?(decidim_admin_assemblies.components_path(current_participatory_space)) %> class="is-active" <% end %>>
11
11
  <%= aria_selected_link_to t("components", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.components_path(current_participatory_space) %>
12
12
  <ul>
@@ -25,21 +25,21 @@
25
25
  </ul>
26
26
  </li>
27
27
  <% end %>
28
- <% if allowed_to? :read, :category %>
28
+ <% if allowed_to? :read, :category, assembly: current_participatory_space %>
29
29
  <li <% if is_active_link?(decidim_admin_assemblies.categories_path(current_participatory_space)) %> class="is-active" <% end %>>
30
30
  <%= aria_selected_link_to t("categories", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.categories_path(current_participatory_space) %>
31
31
  </li>
32
32
  <% end %>
33
- <% if allowed_to?(:read, :attachment_collection) || allowed_to?(:read, :attachment) %>
33
+ <% if allowed_to?(:read, :attachment_collection, assembly: current_participatory_space) || allowed_to?(:read, :attachment, assembly: current_participatory_space) %>
34
34
  <li>
35
35
  <span class="secondary-nav__subtitle"><%= t("attachments", scope: "decidim.admin.menu.assemblies_submenu") %></span>
36
36
  <ul>
37
- <% if allowed_to? :read, :attachment_collection %>
37
+ <% if allowed_to? :read, :attachment_collection, assembly: current_participatory_space %>
38
38
  <li <% if is_active_link?(decidim_admin_assemblies.assembly_attachment_collections_path(current_participatory_space)) %> class="is-active" <% end %>>
39
39
  <%= aria_selected_link_to t("attachment_collections", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.assembly_attachment_collections_path(current_participatory_space) %>
40
40
  </li>
41
41
  <% end %>
42
- <% if allowed_to? :read, :attachment %>
42
+ <% if allowed_to? :read, :attachment, assembly: current_participatory_space %>
43
43
  <li <% if is_active_link?(decidim_admin_assemblies.assembly_attachments_path(current_participatory_space)) %> class="is-active" <% end %>>
44
44
  <%= aria_selected_link_to t("attachment_files", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.assembly_attachments_path(current_participatory_space) %>
45
45
  </li>
@@ -47,22 +47,22 @@
47
47
  </ul>
48
48
  </li>
49
49
  <% end %>
50
- <% if allowed_to? :read, :assembly_member %>
50
+ <% if allowed_to? :read, :assembly_member, assembly: current_participatory_space %>
51
51
  <li <% if is_active_link?(decidim_admin_assemblies.assembly_members_path(current_participatory_space)) %> class="is-active" <% end %>>
52
52
  <%= aria_selected_link_to t("assembly_members", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.assembly_members_path(current_participatory_space) %>
53
53
  </li>
54
54
  <% end %>
55
- <% if allowed_to? :read, :assembly_user_role %>
55
+ <% if allowed_to? :read, :assembly_user_role, assembly: current_participatory_space %>
56
56
  <li <% if is_active_link?(decidim_admin_assemblies.assembly_user_roles_path(current_participatory_space)) %> class="is-active" <% end %>>
57
57
  <%= aria_selected_link_to t("assembly_admins", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.assembly_user_roles_path(current_participatory_space) %>
58
58
  </li>
59
59
  <% end %>
60
- <% if allowed_to? :read, :space_private_user %>
60
+ <% if allowed_to? :read, :space_private_user, assembly: current_participatory_space %>
61
61
  <li <% if is_active_link?(decidim_admin_assemblies.participatory_space_private_users_path(current_participatory_space)) %> class="is-active" <% end %>>
62
62
  <%= aria_selected_link_to t("private_users", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.participatory_space_private_users_path(current_participatory_space) %>
63
63
  </li>
64
64
  <% end %>
65
- <% if allowed_to? :read, :moderation %>
65
+ <% if allowed_to? :read, :moderation, assembly: current_participatory_space %>
66
66
  <li <% if is_active_link?(decidim_admin_assemblies.moderations_path(current_participatory_space)) %> class="is-active" <% end %>>
67
67
  <%= aria_selected_link_to t("moderations", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.moderations_path(current_participatory_space) %>
68
68
  </li>
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-assemblies version.
5
5
  module Assemblies
6
6
  def self.version
7
- "0.12.0"
7
+ "0.12.1"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-assemblies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-06-13 00:00:00.000000000 Z
13
+ date: 2018-06-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.12.0
21
+ version: 0.12.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.12.0
28
+ version: 0.12.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-admin
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.12.0
35
+ version: 0.12.1
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.12.0
42
+ version: 0.12.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-dev
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.12.0
49
+ version: 0.12.1
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.12.0
56
+ version: 0.12.1
57
57
  description: Assemblies component for decidim.
58
58
  email:
59
59
  - josepjaume@gmail.com