Skip to content

Commit

Permalink
Merge pull request #335 from OpenSourcePolitics/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
armandfardeau authored Jul 6, 2023
2 parents 32224a4 + b8f8fa3 commit b524432
Show file tree
Hide file tree
Showing 50 changed files with 9,947 additions and 8,190 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.idea
.github
.rubocop*
.overloads
.erb-lint.yml
.env-example
.env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
namespace: ${{ vars.REGISTRY_NAMESPACE }}
password: ${{ secrets.TOKEN }}
image_name: ${{ vars.IMAGE_NAME }}
tag: "develop-${{ github.sha }}"
tag: "develop"
generate_release:
name: Generate release
needs: [lint, tests, system_tests, test_build]
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ RUN yarn install

COPY . .

RUN bundle exec bootsnap precompile --gemfile app/ lib/ config/ bin/ db/ && bundle exec rails assets:precompile
RUN bundle exec bootsnap precompile --gemfile app/ lib/ config/ bin/ db/ && \
bundle exec rails assets:precompile && \
bundle exec rails deface:precompile

# Configure endpoint.
COPY ./entrypoint.sh /usr/bin/
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ gem "decidim-templates", "~> #{DECIDIM_VERSION}.0"
gem "decidim-cache_cleaner"
gem "decidim-decidim_awesome"
gem "decidim-friendly_signup", git: "https://github.com/OpenSourcePolitics/decidim-module-friendly_signup.git"
gem "decidim-gallery"
gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git", branch: DECIDIM_BRANCH
gem "decidim-ludens", git: "https://github.com/OpenSourcePolitics/decidim-ludens.git", branch: DECIDIM_BRANCH
gem "decidim-phone_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler", branch: DECIDIM_BRANCH
gem "decidim-spam_detection"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer.git", branch: DECIDIM_BRANCH
gem "decidim-term_customizer", git: "https://github.com/armandfardeau/decidim-module-term_customizer.git", branch: "fix/precompile-on-docker-0.26"

# Omniauth gems
gem "omniauth-france_connect", git: "https://github.com/OpenSourcePolitics/omniauth-france_connect"
Expand Down
49 changes: 31 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ GIT
omniauth-oauth2 (>= 1.7.2, < 2.0)

GIT
remote: https://github.com/mainio/decidim-module-term_customizer.git
revision: f0d720710822f1231ea249dd71f978143d38a6c4
branch: release/0.26-stable
remote: https://github.com/armandfardeau/decidim-module-term_customizer.git
revision: 63170f69b51bb7e7f60f20856e944ae1357f4dc7
branch: fix/precompile-on-docker-0.26
specs:
decidim-term_customizer (0.26.0)
decidim-admin (~> 0.26.0)
Expand Down Expand Up @@ -166,7 +166,7 @@ GEM
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
batch-loader (1.5.0)
bcrypt (3.1.18)
bcrypt (3.1.19)
better_html (1.0.16)
actionview (>= 4.0)
activesupport (>= 4.0)
Expand All @@ -192,7 +192,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
carrierwave (2.2.3)
carrierwave (2.2.4)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
Expand Down Expand Up @@ -384,6 +384,10 @@ GEM
decidim-core (= 0.26.7)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
decidim-gallery (0.0.2)
decidim-admin (~> 0.26.0)
decidim-core (~> 0.26.0)
deface (~> 1.9)
decidim-generators (0.26.7)
decidim-core (= 0.26.7)
decidim-meetings (0.26.7)
Expand Down Expand Up @@ -425,6 +429,12 @@ GEM
declarative-option (< 0.2.0)
declarative-option (0.1.0)
deepl-rb (2.5.3)
deface (1.9.0)
actionview (>= 5.2)
nokogiri (>= 1.6)
polyglot
railties (>= 5.2)
rainbow (>= 2.1.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.9.2)
Expand Down Expand Up @@ -466,7 +476,7 @@ GEM
erubi (1.12.0)
et-orbi (1.2.7)
tzinfo
excon (0.99.0)
excon (0.100.0)
execjs (2.8.1)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
Expand All @@ -475,7 +485,7 @@ GEM
railties (>= 3.0.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.4)
faraday (2.7.9)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.3.0)
Expand Down Expand Up @@ -518,7 +528,7 @@ GEM
html_tokenizer (0.0.7)
htmlentities (4.3.4)
httpclient (2.8.3)
i18n (1.13.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.37)
activesupport (>= 4.0.2)
Expand Down Expand Up @@ -547,7 +557,7 @@ GEM
bindata
faraday (~> 2.0)
faraday-follow_redirects
jwt (2.7.0)
jwt (2.7.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -602,7 +612,7 @@ GEM
mime-types-data (3.2023.0218.1)
mini_magick (4.12.0)
mini_mime (1.1.2)
minitest (5.18.0)
minitest (5.18.1)
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
Expand All @@ -612,7 +622,7 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
mustache (1.1.1)
net-imap (0.3.4)
net-imap (0.3.6)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -692,6 +702,7 @@ GEM
pg_search (2.3.6)
activerecord (>= 5.2)
activesupport (>= 5.2)
polyglot (0.3.5)
premailer (1.21.0)
addressable
css_parser (>= 1.12.0)
Expand All @@ -704,7 +715,7 @@ GEM
puma (5.6.5)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.2)
racc (1.7.1)
rack (2.2.7)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
Expand Down Expand Up @@ -741,8 +752,9 @@ GEM
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.1.1)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
Expand Down Expand Up @@ -908,13 +920,13 @@ GEM
ffi (~> 1.1)
system_test_html_screenshots (0.2.0)
actionpack (>= 5.2, < 6.1.a)
temple (0.10.1)
temple (0.10.2)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.1.0)
timeout (0.3.2)
tilt (2.2.0)
timeout (0.4.0)
tomlrb (2.0.3)
tzinfo (1.2.11)
thread_safe (~> 0.1)
Expand All @@ -929,7 +941,7 @@ GEM
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
version_gem (1.1.2)
version_gem (1.1.3)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down Expand Up @@ -996,6 +1008,7 @@ DEPENDENCIES
decidim-decidim_awesome
decidim-dev (~> 0.26.0)
decidim-friendly_signup!
decidim-gallery
decidim-homepage_interactive_map!
decidim-ludens!
decidim-phone_authorization_handler!
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ You can find below an exhaustive list of modules with their repository links and
| [decidim-phone_authorization_handler](https://github.com/OpenSourcePolitics/decidim-module_phone_authorization_handler) ||Module allowing gathering phone number on a particular participant action|
| [decidim-spam_detection](https://github.com/OpenSourcePolitics/decidim-spam_detection) ||Module adding a spam detection algorithm that runs periodically detecting spam accounts|
| [decidim-term_customizer](https://github.com/mainio/decidim-module-term_customizer) ||Module allowing the change of translated strings |
| [decidim-gallery](https://github.com/alecslupu-pfa/decidim-module-gallery)||Module allowing the creation of galleries |


Some non-official customizations can be found see [OVERLOADS.MD](./OVERLOADS.md).
Expand Down
6 changes: 6 additions & 0 deletions app/permissions/decidim/admin/permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def permissions
allow! if read_metrics_action?
allow! if static_page_action?
allow! if organization_action?
allow! if templates_action?
allow! if user_action?

allow! if permission_action.subject == :category
Expand Down Expand Up @@ -68,6 +69,11 @@ def user_manager?
user && !user.admin? && user.role?("user_manager")
end

def templates_action?
permission_action.subject == :templates &&
permission_action.action == :read
end

def read_admin_dashboard_action?
return unless permission_action.subject == :admin_dashboard &&
permission_action.action == :read
Expand Down
Loading

0 comments on commit b524432

Please sign in to comment.