decidim-system 0.31.4 → 0.32.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -14
- data/app/controllers/decidim/system/admins_controller.rb +2 -2
- data/app/controllers/decidim/system/api_users_controller.rb +4 -4
- data/app/controllers/decidim/system/devise/sessions_controller.rb +1 -1
- data/app/controllers/decidim/system/oauth_applications_controller.rb +2 -2
- data/app/controllers/decidim/system/organizations_controller.rb +3 -3
- data/app/forms/decidim/system/register_organization_form.rb +1 -0
- data/app/views/decidim/system/organizations/new.html.erb +1 -1
- data/config/locales/ar.yml +0 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/bs-BA.yml +0 -1
- data/config/locales/ca-IT.yml +2 -3
- data/config/locales/ca.yml +0 -1
- data/config/locales/cs.yml +0 -1
- data/config/locales/de.yml +0 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/eo.yml +0 -1
- data/config/locales/es-MX.yml +0 -1
- data/config/locales/es-PY.yml +0 -1
- data/config/locales/es.yml +0 -1
- data/config/locales/eu.yml +0 -1
- data/config/locales/fa-IR.yml +0 -1
- data/config/locales/fi-plain.yml +0 -1
- data/config/locales/fi.yml +0 -1
- data/config/locales/fr-CA.yml +0 -1
- data/config/locales/fr.yml +0 -1
- data/config/locales/ga-IE.yml +0 -1
- data/config/locales/gl.yml +0 -1
- data/config/locales/hu.yml +0 -1
- data/config/locales/id-ID.yml +0 -1
- data/config/locales/is-IS.yml +1 -2
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +0 -1
- data/config/locales/kaa.yml +0 -1
- data/config/locales/lb.yml +0 -1
- data/config/locales/lt.yml +0 -1
- data/config/locales/lv.yml +0 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/no.yml +0 -1
- data/config/locales/pl.yml +0 -1
- data/config/locales/pt-BR.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/ro-RO.yml +0 -1
- data/config/locales/ru.yml +0 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/sl.yml +0 -1
- data/config/locales/sr-CS.yml +0 -1
- data/config/locales/sv.yml +0 -1
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/zh-CN.yml +0 -1
- data/config/locales/zh-TW.yml +0 -1
- data/decidim-system.gemspec +6 -9
- data/lib/decidim/system/menu.rb +1 -1
- data/lib/decidim/system/version.rb +1 -1
- data/lib/decidim/system.rb +8 -4
- metadata +16 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da5cdf4aa1b70b51c9dd6ddfc54b3955b4a6ba33bee1ad89346993527de4b11e
|
|
4
|
+
data.tar.gz: 8f88aeda85929d086bd2021704dafce5279b9fdb58e4a5654eafa29bcdc4ea30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2cb0273741a8ec3ad00816daf2ceafb913ff062c50ad373d72e7f8668f2570e538fb22d9fdb716efea44c04b9eb5493a91e92ff1cefeb919849ef44059308e8
|
|
7
|
+
data.tar.gz: 0ea01b28e31c1241ee54dbf901311de79dfec8df92e23503421790900f00a136f5be6befa0a2f77049d9dfc4d92fafbdbccb57d560256be5006ab7a3989d405d
|
data/README.md
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# decidim-system
|
|
2
2
|
|
|
3
3
|
This engine adds an administration dashboard so admin can manage a Decidim deploy
|
|
4
4
|
and its organizations when working in a multi-tenant environment.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Add this line to your application's Gemfile:
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
gem 'decidim-system'
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
And then execute:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
bundle
|
|
20
|
-
```
|
|
8
|
+
This is on the default Decidim installation so you should not change anything to use this feature.
|
|
21
9
|
|
|
22
10
|
## Multi-tenancy in Decidim
|
|
23
11
|
|
|
@@ -24,7 +24,7 @@ module Decidim
|
|
|
24
24
|
|
|
25
25
|
on(:invalid) do
|
|
26
26
|
flash.now[:alert] = I18n.t("admins.create.error", scope: "decidim.system")
|
|
27
|
-
render :new, status: :
|
|
27
|
+
render :new, status: :unprocessable_content
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -46,7 +46,7 @@ module Decidim
|
|
|
46
46
|
|
|
47
47
|
on(:invalid) do
|
|
48
48
|
flash.now[:alert] = I18n.t("admins.update.error", scope: "decidim.system")
|
|
49
|
-
render :edit, status: :
|
|
49
|
+
render :edit, status: :unprocessable_content
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
end
|
|
@@ -29,7 +29,7 @@ module Decidim
|
|
|
29
29
|
RefreshApiUserSecret.call(api_user, current_admin) do
|
|
30
30
|
on(:ok) do |secret|
|
|
31
31
|
flash[:notice] = I18n.t("api_user.refresh.success", scope: "decidim.system", user: api_user.api_key)
|
|
32
|
-
session[:api_user] = { id: api_user.id, secret:
|
|
32
|
+
session[:api_user] = { id: api_user.id, secret: }
|
|
33
33
|
redirect_to action: :index
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -41,17 +41,17 @@ module Decidim
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def create
|
|
44
|
-
@form = ::Decidim::System::ApiUserForm.from_params(params.merge!(name: params[:admin][:name], organization:
|
|
44
|
+
@form = ::Decidim::System::ApiUserForm.from_params(params.merge!(name: params[:admin][:name], organization:))
|
|
45
45
|
CreateApiUser.call(@form, current_admin) do
|
|
46
46
|
on(:ok) do |api_user, secret|
|
|
47
47
|
flash[:notice] = I18n.t("api_user.create.success", scope: "decidim.system", user: api_user.api_key)
|
|
48
|
-
session[:api_user] = { id: api_user.id, secret:
|
|
48
|
+
session[:api_user] = { id: api_user.id, secret: }
|
|
49
49
|
redirect_to action: :index
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
on(:invalid) do
|
|
53
53
|
flash[:error] = I18n.t("api_user.create.error", scope: "decidim.system")
|
|
54
|
-
render :new, status: :
|
|
54
|
+
render :new, status: :unprocessable_content
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
end
|
|
@@ -30,7 +30,7 @@ module Decidim
|
|
|
30
30
|
|
|
31
31
|
on(:invalid) do
|
|
32
32
|
flash.now[:alert] = I18n.t("oauth_applications.create.error", scope: "decidim.system")
|
|
33
|
-
render :new, status: :
|
|
33
|
+
render :new, status: :unprocessable_content
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -55,7 +55,7 @@ module Decidim
|
|
|
55
55
|
on(:invalid) do |application|
|
|
56
56
|
@oauth_application = application
|
|
57
57
|
flash.now[:error] = I18n.t("oauth_applications.update.error", scope: "decidim.system")
|
|
58
|
-
render action: :edit, status: :
|
|
58
|
+
render action: :edit, status: :unprocessable_content
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -24,12 +24,12 @@ module Decidim
|
|
|
24
24
|
|
|
25
25
|
on(:invalid_invitation) do
|
|
26
26
|
flash.now[:alert] = t("organizations.create.error_invitation", scope: "decidim.system")
|
|
27
|
-
render :new, status: :
|
|
27
|
+
render :new, status: :unprocessable_content
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
on(:invalid) do
|
|
31
31
|
flash.now[:alert] = t("organizations.create.error", scope: "decidim.system")
|
|
32
|
-
render :new, status: :
|
|
32
|
+
render :new, status: :unprocessable_content
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -55,7 +55,7 @@ module Decidim
|
|
|
55
55
|
|
|
56
56
|
on(:invalid) do
|
|
57
57
|
flash.now[:alert] = I18n.t("organizations.update.error", scope: "decidim.system")
|
|
58
|
-
render :edit, status: :
|
|
58
|
+
render :edit, status: :unprocessable_content
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<tbody>
|
|
34
34
|
<% localized_locales.each do |locale| %>
|
|
35
35
|
<tr>
|
|
36
|
-
<td><%= locale.name
|
|
36
|
+
<td><%= locale.name %> (<%= locale.id %>)</td>
|
|
37
37
|
<td><%= check_box_tag "organization[available_locales][#{locale.id}]", locale.id, @form.available_locales.include?(locale.id), class: "!m-0" %></td>
|
|
38
38
|
<td><%= radio_button_tag "organization[default_locale]", locale.id, @form.default_locale == locale.id, class: "!m-0" %></td>
|
|
39
39
|
</tr>
|
data/config/locales/ar.yml
CHANGED
data/config/locales/bg.yml
CHANGED
data/config/locales/bs-BA.yml
CHANGED
data/config/locales/ca-IT.yml
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
---
|
|
2
1
|
ca-IT:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
5
4
|
oauth_application:
|
|
6
|
-
name: Nom de l'aplicació
|
|
5
|
+
name: Nom de l'aplicació
|
|
7
6
|
organization_logo: Logo de l'organització (quadrat)
|
|
8
7
|
organization_name: Organització
|
|
9
8
|
organization_url: URL de l'organització
|
|
@@ -299,7 +298,7 @@ ca-IT:
|
|
|
299
298
|
organization_admin_email_hint: T'enviarem un correu electrònic a aquesta adreça perquè puguis confirmar-la i configurar la teva contrasenya.
|
|
300
299
|
reference_prefix_hint: El prefix de la referència s'utilitza per identificar de forma única els recursos del conjunt de l'organització.
|
|
301
300
|
secondary_hosts_hint: Introdueix cada un d'ells en una nova línia.
|
|
302
|
-
short_name_hint: Nom curt que es farà servir per a l'Aplicació Web Progressiva
|
|
301
|
+
short_name_hint: Nom curt que es farà servir per a l'Aplicació Web Progressiva. Ha de tenir un màxim de 12 caràcters.
|
|
303
302
|
title: Nova organització
|
|
304
303
|
omniauth_settings:
|
|
305
304
|
decidim:
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/el.yml
CHANGED
data/config/locales/eo.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/eu.yml
CHANGED
data/config/locales/fa-IR.yml
CHANGED
data/config/locales/fi-plain.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr-CA.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/ga-IE.yml
CHANGED
data/config/locales/gl.yml
CHANGED
data/config/locales/hu.yml
CHANGED
data/config/locales/id-ID.yml
CHANGED
data/config/locales/is-IS.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/kaa.yml
CHANGED
data/config/locales/lb.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pl.yml
CHANGED
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro-RO.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/sr-CS.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
data/config/locales/zh-TW.yml
CHANGED
data/decidim-system.gemspec
CHANGED
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
4
|
|
|
5
|
-
# Maintain your gem's version:
|
|
6
|
-
require "decidim/system/version"
|
|
7
|
-
|
|
8
|
-
# Describe your gem and declare its dependencies:
|
|
9
5
|
Gem::Specification.new do |s|
|
|
10
|
-
|
|
6
|
+
version = "0.32.0.rc1"
|
|
7
|
+
s.version = version
|
|
11
8
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
|
12
9
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
|
13
10
|
s.license = "AGPL-3.0-or-later"
|
|
@@ -19,7 +16,7 @@ Gem::Specification.new do |s|
|
|
|
19
16
|
"homepage_uri" => "https://decidim.org",
|
|
20
17
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
|
21
18
|
}
|
|
22
|
-
s.required_ruby_version = "~> 3.
|
|
19
|
+
s.required_ruby_version = "~> 3.4.0"
|
|
23
20
|
|
|
24
21
|
s.name = "decidim-system"
|
|
25
22
|
s.summary = "Decidim system administration"
|
|
@@ -33,10 +30,10 @@ Gem::Specification.new do |s|
|
|
|
33
30
|
end
|
|
34
31
|
|
|
35
32
|
s.add_dependency "active_link_to", "~> 1.0"
|
|
36
|
-
s.add_dependency "decidim-core",
|
|
37
|
-
s.add_dependency "devise", "
|
|
33
|
+
s.add_dependency "decidim-core", version
|
|
34
|
+
s.add_dependency "devise", ">= 4.7", "< 6.0"
|
|
38
35
|
s.add_dependency "devise-i18n", "~> 1.2"
|
|
39
36
|
s.add_dependency "devise_invitable", "~> 2.0", ">= 2.0.9"
|
|
40
37
|
|
|
41
|
-
s.add_development_dependency "decidim-dev",
|
|
38
|
+
s.add_development_dependency "decidim-dev", version
|
|
42
39
|
end
|
data/lib/decidim/system/menu.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Decidim
|
|
|
9
9
|
I18n.t("menu.dashboard", scope: "decidim.system"),
|
|
10
10
|
decidim_system.root_path,
|
|
11
11
|
position: 1,
|
|
12
|
-
active: ["decidim/system/dashboard" => :show]
|
|
12
|
+
active: [{ "decidim/system/dashboard" => :show }]
|
|
13
13
|
if Decidim.module_installed?(:api)
|
|
14
14
|
menu.add_item :api_credentials,
|
|
15
15
|
I18n.t("menu.api_credentials", scope: "decidim.system"),
|
data/lib/decidim/system.rb
CHANGED
|
@@ -9,11 +9,15 @@ module Decidim
|
|
|
9
9
|
# eye view of the whole system.
|
|
10
10
|
#
|
|
11
11
|
module System
|
|
12
|
-
|
|
12
|
+
class << self
|
|
13
|
+
def config = self
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
def configure
|
|
16
|
+
yield self
|
|
17
|
+
end
|
|
17
18
|
end
|
|
19
|
+
|
|
20
|
+
# The length of API secrets generated for API users.
|
|
21
|
+
mattr_accessor :api_users_secret_length, default: ENV.fetch("DECIDIM_SYSTEM_API_USERS_SECRET_LENGTH", 32).to_i
|
|
18
22
|
end
|
|
19
23
|
end
|
metadata
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-system
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.32.0.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
8
8
|
- Marc Riera Casals
|
|
9
9
|
- Oriol Gual Oliva
|
|
10
|
-
autorequire:
|
|
11
10
|
bindir: bin
|
|
12
11
|
cert_chain: []
|
|
13
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
14
13
|
dependencies:
|
|
15
14
|
- !ruby/object:Gem::Dependency
|
|
16
15
|
name: active_link_to
|
|
@@ -32,28 +31,34 @@ dependencies:
|
|
|
32
31
|
requirements:
|
|
33
32
|
- - '='
|
|
34
33
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 0.
|
|
34
|
+
version: 0.32.0.rc1
|
|
36
35
|
type: :runtime
|
|
37
36
|
prerelease: false
|
|
38
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
38
|
requirements:
|
|
40
39
|
- - '='
|
|
41
40
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: 0.
|
|
41
|
+
version: 0.32.0.rc1
|
|
43
42
|
- !ruby/object:Gem::Dependency
|
|
44
43
|
name: devise
|
|
45
44
|
requirement: !ruby/object:Gem::Requirement
|
|
46
45
|
requirements:
|
|
47
|
-
- - "
|
|
46
|
+
- - ">="
|
|
48
47
|
- !ruby/object:Gem::Version
|
|
49
48
|
version: '4.7'
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '6.0'
|
|
50
52
|
type: :runtime
|
|
51
53
|
prerelease: false
|
|
52
54
|
version_requirements: !ruby/object:Gem::Requirement
|
|
53
55
|
requirements:
|
|
54
|
-
- - "
|
|
56
|
+
- - ">="
|
|
55
57
|
- !ruby/object:Gem::Version
|
|
56
58
|
version: '4.7'
|
|
59
|
+
- - "<"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '6.0'
|
|
57
62
|
- !ruby/object:Gem::Dependency
|
|
58
63
|
name: devise-i18n
|
|
59
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -94,14 +99,14 @@ dependencies:
|
|
|
94
99
|
requirements:
|
|
95
100
|
- - '='
|
|
96
101
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 0.
|
|
102
|
+
version: 0.32.0.rc1
|
|
98
103
|
type: :development
|
|
99
104
|
prerelease: false
|
|
100
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
101
106
|
requirements:
|
|
102
107
|
- - '='
|
|
103
108
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: 0.
|
|
109
|
+
version: 0.32.0.rc1
|
|
105
110
|
description: System administration to create new organization in an installation.
|
|
106
111
|
email:
|
|
107
112
|
- josepjaume@gmail.com
|
|
@@ -294,7 +299,6 @@ metadata:
|
|
|
294
299
|
funding_uri: https://opencollective.com/decidim
|
|
295
300
|
homepage_uri: https://decidim.org
|
|
296
301
|
source_code_uri: https://github.com/decidim/decidim
|
|
297
|
-
post_install_message:
|
|
298
302
|
rdoc_options: []
|
|
299
303
|
require_paths:
|
|
300
304
|
- lib
|
|
@@ -302,15 +306,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
302
306
|
requirements:
|
|
303
307
|
- - "~>"
|
|
304
308
|
- !ruby/object:Gem::Version
|
|
305
|
-
version: 3.
|
|
309
|
+
version: 3.4.0
|
|
306
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
311
|
requirements:
|
|
308
312
|
- - ">="
|
|
309
313
|
- !ruby/object:Gem::Version
|
|
310
314
|
version: '0'
|
|
311
315
|
requirements: []
|
|
312
|
-
rubygems_version: 3.
|
|
313
|
-
signing_key:
|
|
316
|
+
rubygems_version: 3.6.9
|
|
314
317
|
specification_version: 4
|
|
315
318
|
summary: Decidim system administration
|
|
316
319
|
test_files: []
|