trusty-cms 7.0.2 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gemfile +2 -2
  4. data/Gemfile.lock +89 -102
  5. data/INSTALL.md +8 -6
  6. data/README.md +16 -11
  7. data/app/assets/stylesheets/admin/partials/_forms.scss +13 -0
  8. data/app/controllers/admin/configuration_controller.rb +1 -1
  9. data/app/controllers/admin/extensions_controller.rb +1 -0
  10. data/app/controllers/admin/layouts_controller.rb +2 -1
  11. data/app/controllers/admin/resource_controller.rb +10 -1
  12. data/app/controllers/admin/sites_controller.rb +1 -0
  13. data/app/controllers/admin/snippets_controller.rb +2 -1
  14. data/app/controllers/admin/users_controller.rb +2 -1
  15. data/app/helpers/admin/users_helper.rb +2 -1
  16. data/app/models/admins_site.rb +6 -0
  17. data/app/models/site.rb +2 -0
  18. data/app/models/trusty_cms/config.rb +2 -1
  19. data/app/models/user.rb +15 -4
  20. data/app/views/admin/layouts/_choose_site.html.haml +5 -3
  21. data/app/views/admin/layouts/_site_chooser.html.haml +2 -2
  22. data/app/views/admin/pages/_fields.html.haml +4 -3
  23. data/app/views/admin/pages/_node.html.haml +1 -1
  24. data/app/views/admin/snippets/_choose_site.html.haml +2 -1
  25. data/app/views/admin/users/_choose_site.html.haml +2 -1
  26. data/app/views/admin/users/_form.html.haml +3 -1
  27. data/bin/rails +2 -2
  28. data/config/application.rb +1 -0
  29. data/config/locales/en.yml +10 -8
  30. data/db/migrate/20241108172942_create_site_users.rb +8 -0
  31. data/lib/login_system.rb +15 -15
  32. data/lib/trusty_cms/version.rb +1 -1
  33. data/spec/dummy/config/application.rb +2 -0
  34. data/spec/dummy/db/schema.rb +8 -1
  35. data/spec/factories/snippet.rb +10 -0
  36. data/spec/factories/user.rb +11 -11
  37. data/spec/models/snippets_spec.rb +29 -0
  38. data/spec/models/user_spec.rb +46 -0
  39. data/trusty_cms.gemspec +1 -1
  40. data/vendor/extensions/multi-site-extension/lib/multi_site/scoped_model.rb +17 -11
  41. data/vendor/extensions/multi-site-extension/lib/multi_site/site_chooser_helper.rb +10 -10
  42. metadata +12 -5
  43. data/app/users/_choose_site.html.haml +0 -4
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-29 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator
@@ -301,7 +301,7 @@ dependencies:
301
301
  version: 2.0.1
302
302
  - - "<"
303
303
  - !ruby/object:Gem::Version
304
- version: 3.1.0
304
+ version: 3.2.0
305
305
  type: :runtime
306
306
  prerelease: false
307
307
  version_requirements: !ruby/object:Gem::Requirement
@@ -311,7 +311,7 @@ dependencies:
311
311
  version: 2.0.1
312
312
  - - "<"
313
313
  - !ruby/object:Gem::Version
314
- version: 3.1.0
314
+ version: 3.2.0
315
315
  - !ruby/object:Gem::Dependency
316
316
  name: rack-cache
317
317
  requirement: !ruby/object:Gem::Requirement
@@ -730,6 +730,7 @@ files:
730
730
  - app/mailers/application_mailer.rb
731
731
  - app/mailers/devise_mailer.rb
732
732
  - app/mailers/rad_social_mailer.rb
733
+ - app/models/admins_site.rb
733
734
  - app/models/asset.rb
734
735
  - app/models/asset_type.rb
735
736
  - app/models/file_not_found_page.rb
@@ -753,7 +754,6 @@ files:
753
754
  - app/models/trusty_cms/page_response_cache_director.rb
754
755
  - app/models/user.rb
755
756
  - app/models/user_action_observer.rb
756
- - app/users/_choose_site.html.haml
757
757
  - app/views/admin/assets/_asset.html.haml
758
758
  - app/views/admin/assets/_asset_table.html.haml
759
759
  - app/views/admin/assets/_errors.html.haml
@@ -908,6 +908,7 @@ files:
908
908
  - db/migrate/20161027141250_add_position_to_pages.rb
909
909
  - db/migrate/20200117141251_create_admin_users.rb
910
910
  - db/migrate/20210331134718_create_active_storage_tables.active_storage.rb
911
+ - db/migrate/20241108172942_create_site_users.rb
911
912
  - db/schema.rb
912
913
  - lib/active_record_extensions/active_record_extensions.rb
913
914
  - lib/annotatable.rb
@@ -1097,12 +1098,15 @@ files:
1097
1098
  - spec/factories/layout.rb
1098
1099
  - spec/factories/page.rb
1099
1100
  - spec/factories/page_part.rb
1101
+ - spec/factories/snippet.rb
1100
1102
  - spec/factories/user.rb
1101
1103
  - spec/features/config_spec.rb
1102
1104
  - spec/features/layouts_spec.rb
1103
1105
  - spec/features/pages_spec.rb
1104
1106
  - spec/fixtures/users.yml
1105
1107
  - spec/models/layout_spec.rb
1108
+ - spec/models/snippets_spec.rb
1109
+ - spec/models/user_spec.rb
1106
1110
  - spec/rails_helper.rb
1107
1111
  - spec/spec_helper.rb
1108
1112
  - spec/support/custom_actions.rb
@@ -1248,12 +1252,15 @@ test_files:
1248
1252
  - spec/factories/layout.rb
1249
1253
  - spec/factories/page.rb
1250
1254
  - spec/factories/page_part.rb
1255
+ - spec/factories/snippet.rb
1251
1256
  - spec/factories/user.rb
1252
1257
  - spec/features/config_spec.rb
1253
1258
  - spec/features/layouts_spec.rb
1254
1259
  - spec/features/pages_spec.rb
1255
1260
  - spec/fixtures/users.yml
1256
1261
  - spec/models/layout_spec.rb
1262
+ - spec/models/snippets_spec.rb
1263
+ - spec/models/user_spec.rb
1257
1264
  - spec/rails_helper.rb
1258
1265
  - spec/spec_helper.rb
1259
1266
  - spec/support/custom_actions.rb
@@ -1,4 +0,0 @@
1
- - unless current_user.site
2
- %label{:for=>"user_admin"} Can edit site
3
- = select :user, :site_id, [['<any>', '']] + Site.all.map { |s| [s.name, s.id] }
4
- .caption A user with no site is able to act (to whatever extent their status allows) on any site.