decidim-department_admin 0.8.0 → 0.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ecc31ae9e41149508bba0d66faec60a5f49874502d1a60440094a792acffcf1
|
4
|
+
data.tar.gz: 66805a1eb552135f18a6e60eb801755b2712ac769e9d4209bcbd20bb390456c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac8a0f7d0d1d43f7a2e61044a676dc8c0ef005bb7749742d0e577e4895da8de449ca4d167174bf9ffc9ac26a44d05a36f5f16f3129b030b1d4ebd4a9a3d735e
|
7
|
+
data.tar.gz: 2d40480e18d898b50445dd540d2c90fa36a440413b7c6a772a8048af3149153d94acd555d5124d59caf7b3932159869cef54b2ea2b34ba92cdcce818e5aa0b56
|
@@ -2,32 +2,35 @@
|
|
2
2
|
|
3
3
|
module Lib::Decidim::ParticipatorySpaceResourceableDecorator
|
4
4
|
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
5
|
+
# - Add new ParticipatorySpaceRole case for DeparmentAdmin.
|
6
|
+
# - Add .to_sym to the `case` test, to avoid error when logged in user is Department Admin
|
7
|
+
# This override affects only line `case role_name&.to_sym`
|
8
8
|
#
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
else
|
26
|
-
Decidim::ParticipatorySpaceRoleConfig::NullObject.new(user)
|
27
|
-
end
|
28
|
-
end
|
9
|
+
def user_role_config_for(user, role_name)
|
10
|
+
case role_name&.to_sym
|
11
|
+
when :organization_admin
|
12
|
+
Decidim::ParticipatorySpaceRoleConfig::Admin.new(user)
|
13
|
+
when :admin # ParticipatorySpace admin
|
14
|
+
Decidim::ParticipatorySpaceRoleConfig::ParticipatorySpaceAdmin.new(user)
|
15
|
+
when :department_admin
|
16
|
+
Decidim::ParticipatorySpaceRoleConfig::DepartmentAdmin.new(user)
|
17
|
+
when :valuator
|
18
|
+
Decidim::ParticipatorySpaceRoleConfig::Valuator.new(user)
|
19
|
+
when :moderator
|
20
|
+
Decidim::ParticipatorySpaceRoleConfig::Moderator.new(user)
|
21
|
+
when :collaborator
|
22
|
+
Decidim::ParticipatorySpaceRoleConfig::Collaborator.new(user)
|
23
|
+
else
|
24
|
+
Decidim::ParticipatorySpaceRoleConfig::NullObject.new(user)
|
29
25
|
end
|
30
26
|
end
|
31
27
|
end
|
32
28
|
|
33
|
-
|
29
|
+
require "decidim/assembly"
|
30
|
+
Decidim::Assembly.prepend(Lib::Decidim::ParticipatorySpaceResourceableDecorator)
|
31
|
+
require "decidim/participatory_process"
|
32
|
+
Decidim::ParticipatoryProcess.prepend(Lib::Decidim::ParticipatorySpaceResourceableDecorator)
|
33
|
+
if Decidim::DepartmentAdmin.conferences_defined?
|
34
|
+
require "decidim/conference"
|
35
|
+
Decidim::Conference.prepend(Lib::Decidim::ParticipatorySpaceResourceableDecorator)
|
36
|
+
end
|
@@ -47,6 +47,7 @@ module Decidim
|
|
47
47
|
# force the concern to be included so that registry is initialized
|
48
48
|
# we choose some random class already including it
|
49
49
|
require "decidim/participatory_processes/admin/categories_controller"
|
50
|
+
require "decidim/participatory_processes/admin/components_controller"
|
50
51
|
artifact = ::Decidim::ParticipatoryProcesses::Admin::Concerns::ParticipatoryProcessAdmin
|
51
52
|
ParticipatoryProcessesAdminConcernPermissions = Class.new(::Decidim::DepartmentAdmin::Permissions)
|
52
53
|
register_new_permissions_for(artifact, ParticipatoryProcessesAdminConcernPermissions)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-department_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Valls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|