cms-fortress 1.3.6 → 1.3.7

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
  SHA1:
3
- metadata.gz: f2bca720ab1f1da2525484105683827daabd9a25
4
- data.tar.gz: 95d00bdc7e0a0f2e23b7ed3e5512060d1b084a38
3
+ metadata.gz: a13acd911a9ef0db5c70a5ccbf643782534640a9
4
+ data.tar.gz: 8b55c888dae432288aa63d897f67061335d01200
5
5
  SHA512:
6
- metadata.gz: 7f3fd08e8942bd50309526206a530c9c32c0075202053083269f7440ff3c1b696050fe86ae03904a49ec8f55e36d142eeb3cc4a37763a455ba2f5a0be7b50239
7
- data.tar.gz: f99d3f5f81118ea2f369c998ed5a12be1d241a2fb49f02400481f53f8541076c5a18151b9b286ecb65370301efcc8e338f8cb9209df4b5d2ae459a3fb46dceee
6
+ metadata.gz: 82136cf0dca738409b1fce5d250e3046f822e7461c4a6ece7db42023e9887e4ef22aa076e1e2dd57bd17445392e2e6487290b0da0de1a8e3a03fefeb1e8a2914
7
+ data.tar.gz: ba5e42e00022efe3613f30ccc20446d29f0eb3649c7617fba3f6704fbbf9bb28340292e72de79d9b15830575a193a1dbc37f86966ce2342264779c5ba7f5545f
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
4
+
5
+ install: bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
6
+
7
+ branches:
8
+ only:
9
+ - master
10
+
11
+ cache: bundler
@@ -0,0 +1,9 @@
1
+ = Contributing to cms-fortress
2
+
3
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
4
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
5
+ * Fork the project.
6
+ * Start a feature/bugfix branch.
7
+ * Commit and push until you are happy with your contribution.
8
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
9
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cms-fortress (1.3.6)
4
+ cms-fortress (1.3.7)
5
5
  aasm (~> 4.0)
6
6
  cancancan (~> 1.9)
7
7
  comfortable_mexican_sofa (~> 1.12, >= 1.12.5)
@@ -14,7 +14,7 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- aasm (4.0.8)
17
+ aasm (4.1.0)
18
18
  actionmailer (4.0.13)
19
19
  actionpack (= 4.0.13)
20
20
  mail (~> 2.5, >= 2.5.4)
@@ -43,21 +43,21 @@ GEM
43
43
  tzinfo (~> 0.3.37)
44
44
  ansi (1.5.0)
45
45
  arel (4.0.2)
46
- autoprefixer-rails (5.0.0.3)
46
+ autoprefixer-rails (5.1.7.1)
47
47
  execjs
48
48
  json
49
- bcrypt (3.1.9)
50
- bootstrap-sass (3.3.3)
49
+ bcrypt (3.1.10)
50
+ bootstrap-sass (3.3.4.1)
51
51
  autoprefixer-rails (>= 5.0.0.1)
52
52
  sass (>= 3.2.19)
53
- bootstrap_form (2.2.0)
53
+ bootstrap_form (2.3.0)
54
54
  builder (3.1.4)
55
55
  cancancan (1.10.1)
56
56
  climate_control (0.0.3)
57
57
  activesupport (>= 3.0)
58
- cocaine (0.5.5)
58
+ cocaine (0.5.7)
59
59
  climate_control (>= 0.0.3, < 1.0)
60
- codemirror-rails (4.8)
60
+ codemirror-rails (5.0)
61
61
  railties (>= 3.0, < 5)
62
62
  coffee-rails (4.1.0)
63
63
  coffee-script (>= 2.2.0)
@@ -65,8 +65,8 @@ GEM
65
65
  coffee-script (2.3.0)
66
66
  coffee-script-source
67
67
  execjs
68
- coffee-script-source (1.8.0)
69
- comfortable_mexican_sofa (1.12.6)
68
+ coffee-script-source (1.9.1)
69
+ comfortable_mexican_sofa (1.12.7)
70
70
  active_link_to (>= 1.0.0)
71
71
  bootstrap-sass (>= 3.2.0)
72
72
  bootstrap_form (>= 2.2.0)
@@ -92,16 +92,16 @@ GEM
92
92
  warden (~> 1.2.3)
93
93
  docile (1.1.5)
94
94
  erubis (2.7.0)
95
- execjs (2.2.2)
95
+ execjs (2.4.0)
96
96
  haml (4.0.6)
97
97
  tilt
98
- haml-rails (0.7.0)
98
+ haml-rails (0.9.0)
99
99
  actionpack (>= 4.0.1)
100
100
  activesupport (>= 4.0.1)
101
- haml (>= 3.1, < 5.0)
101
+ haml (>= 4.0.6, < 5.0)
102
102
  html2haml (>= 1.0.1)
103
103
  railties (>= 4.0.1)
104
- hashie (3.3.2)
104
+ hashie (3.4.0)
105
105
  hike (1.2.3)
106
106
  html2haml (2.0.0)
107
107
  erubis (~> 2.7.0)
@@ -115,7 +115,7 @@ GEM
115
115
  jquery-ui-rails (5.0.3)
116
116
  railties (>= 3.2.16)
117
117
  json (1.8.2)
118
- kramdown (1.5.0)
118
+ kramdown (1.6.0)
119
119
  mail (2.6.3)
120
120
  mime-types (>= 1.16, < 3)
121
121
  mime-types (2.4.3)
@@ -130,12 +130,12 @@ GEM
130
130
  builder
131
131
  minitest (>= 2.12, < 5.0)
132
132
  powerbar
133
- minitest-spec-rails (4.7.7)
133
+ minitest-spec-rails (4.7.8)
134
134
  minitest (~> 4.7)
135
135
  rails (>= 3.0, < 4.1)
136
136
  minitest-test (1.1.0)
137
137
  minitest (~> 4.0)
138
- multi_json (1.10.1)
138
+ multi_json (1.11.0)
139
139
  nokogiri (1.6.6.2)
140
140
  mini_portile (~> 0.6.0)
141
141
  orm_adapter (0.5.0)
@@ -160,7 +160,7 @@ GEM
160
160
  bundler (>= 1.3.0, < 2.0)
161
161
  railties (= 4.0.13)
162
162
  sprockets-rails (~> 2.0)
163
- rails-i18n (4.0.3)
163
+ rails-i18n (4.0.4)
164
164
  i18n (~> 0.6)
165
165
  railties (~> 4.0)
166
166
  railties (4.0.13)
@@ -173,21 +173,21 @@ GEM
173
173
  json (~> 1.4)
174
174
  responders (1.1.2)
175
175
  railties (>= 3.2, < 4.2)
176
- ruby_parser (3.6.4)
176
+ ruby_parser (3.6.5)
177
177
  sexp_processor (~> 4.1)
178
- sass (3.4.10)
178
+ sass (3.4.13)
179
179
  sass-rails (5.0.1)
180
180
  railties (>= 4.0.0, < 5.0)
181
181
  sass (~> 3.1)
182
182
  sprockets (>= 2.8, < 4.0)
183
183
  sprockets-rails (>= 2.0, < 4.0)
184
184
  tilt (~> 1.1)
185
- sexp_processor (4.4.5)
186
- simplecov (0.9.1)
185
+ sexp_processor (4.5.0)
186
+ simplecov (0.9.2)
187
187
  docile (~> 1.1.0)
188
188
  multi_json (~> 1.0)
189
- simplecov-html (~> 0.8.0)
190
- simplecov-html (0.8.0)
189
+ simplecov-html (~> 0.9.0)
190
+ simplecov-html (0.9.0)
191
191
  sprockets (2.12.3)
192
192
  hike (~> 1.2)
193
193
  multi_json (~> 1.0)
@@ -199,13 +199,13 @@ GEM
199
199
  sprockets (>= 2.8, < 4.0)
200
200
  sqlite3 (1.3.10)
201
201
  thor (0.19.1)
202
- thread_safe (0.3.4)
202
+ thread_safe (0.3.5)
203
203
  tilt (1.4.1)
204
204
  tinymce-rails (4.1.6)
205
205
  railties (>= 3.1.1)
206
206
  tinymce-rails-langs (4.20140129)
207
207
  tinymce-rails (~> 4.0)
208
- tzinfo (0.3.42)
208
+ tzinfo (0.3.43)
209
209
  warden (1.2.3)
210
210
  rack (>= 1.0)
211
211
 
@@ -1,10 +1,11 @@
1
1
  {<img src="https://badge.fury.io/rb/cms-fortress.png" alt="Gem Version" />}[http://badge.fury.io/rb/cms-fortress]
2
2
  {<img src="https://gemnasium.com/melvinsembrano/cms-fortress.png" alt="Dependencies" />}[https://gemnasium.com/melvinsembrano/cms-fortress]
3
3
  {<img src="https://codeclimate.com/github/melvinsembrano/cms-fortress.png" alt="Code Climate" />}[https://codeclimate.com/github/melvinsembrano/cms-fortress]
4
+ {<img src="https://travis-ci.org/melvinsembrano/cms-fortress.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/melvinsembrano/cms-fortress]
4
5
 
5
6
  = cms-fortress
6
7
 
7
- An extension for the awesome Comfortable Mexican Sofa (https://github.com/comfy/comfortable-mexican-sofa) CMS Engine
8
+ An extension for the awesome ComfortableMexicanSofa (https://github.com/comfy/comfortable-mexican-sofa) CMS Engine
8
9
 
9
10
  * Added Role Management for proper workflow
10
11
  * Added Devise for User and Session Management
@@ -22,7 +23,7 @@ An extension for the awesome Comfortable Mexican Sofa (https://github.com/comfy/
22
23
 
23
24
  Add gem defintion to your Gemfile:
24
25
 
25
- gem 'cms-fortress', '~> 1.3.0'
26
+ gem 'cms-fortress', '~> 1.3.6'
26
27
 
27
28
  Then from the Rails project's root run:
28
29
 
@@ -84,13 +85,13 @@ You can create a custom role ability via a three-step process.
84
85
  :path => 'admin_my_role_details_path',
85
86
  :super_user => true
86
87
  }
87
-
88
+
88
89
  # adding a divider menu item (Wide Theme only)
89
90
  config.content_resources << {name: 'divider'}
90
-
91
+
91
92
  #adding a menu header item (Wide Theme only)
92
93
  config.content_resources << {name: 'dropdown-header', title: "i18n.my.header.label"}
93
-
94
+
94
95
  end
95
96
 
96
97
  The path is eval'd at runtime, so you can use Rails helper methods such as
@@ -117,9 +118,9 @@ Below are the fetures for wide theme:
117
118
  * Compact Layout and Menus
118
119
  * Responsive Layout
119
120
  * Fullcreen Editing
120
- * Integrated image file attachement
121
+ * Integrated image file attachment
121
122
  * Integrated video file attachment
122
- * Integrated link file attachement
123
+ * Integrated link file attachment
123
124
 
124
125
  http://raw.github.com/melvinsembrano/cms-fortress/master/docs/screens/compact-layout-01.png
125
126
 
@@ -140,15 +141,9 @@ Afterwards you can run the tests by calling
140
141
 
141
142
  rake test
142
143
 
143
- == Contributing to cms-fortress
144
+ == Contributing
144
145
 
145
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
146
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
147
- * Fork the project.
148
- * Start a feature/bugfix branch.
149
- * Commit and push until you are happy with your contribution.
150
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
151
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
146
+ Please see {CONTRIBUTING.rdoc}[https://github.com/melvinsembrano/cms-fortress/blob/master/CONTRIBUTING.rdoc] for details.
152
147
 
153
148
  == Copyright
154
149
 
@@ -1,11 +1,14 @@
1
- //= require tinymce-jquery
2
- //= require '../site_selector'
3
-
4
-
5
- window.CMS.wysiwyg = function () {
6
- return <%= tinymce_init %>
7
- }
1
+ <% config = Cms::Fortress::Settings.new(:global_settings).to_h %>
8
2
 
3
+ //= require '../site_selector'
9
4
  $(document).ready( function() {
10
5
  $('.dropdown-toggle').dropdown();
11
6
  });
7
+
8
+ <% if config[:use_tinymce] %>
9
+ //= require tinymce-jquery
10
+ window.CMS.wysiwyg = function () {
11
+ return <%= tinymce_init %>
12
+ }
13
+ <% end %>
14
+
@@ -5,8 +5,16 @@ class Cms::Fortress::User < ActiveRecord::Base
5
5
  # Include default devise modules. Others available are:
6
6
  # :token_authenticatable, :confirmable,
7
7
  # :lockable, :timeoutable and :omniauthable
8
+ # manually add :validatable validations because uniqueness does not include :site_id
9
+ validates_presence_of :email, if: :email_required?
10
+ validates_uniqueness_of :email, scope: :site_id, allow_blank: true, if: :email_changed?
11
+ validates_format_of :email, with: Devise.email_regexp, allow_blank: true, if: :email_changed?
12
+ validates_presence_of :password, if: :password_required?
13
+ validates_confirmation_of :password, if: :password_required?
14
+ validates_length_of :password, within: Devise.password_length, allow_blank: true
8
15
  devise :database_authenticatable,
9
- :recoverable, :rememberable, :trackable, :validatable, :timeoutable
16
+ :recoverable, :rememberable, :trackable, :timeoutable,
17
+ :authentication_keys => [:email, :site_id]
10
18
 
11
19
  belongs_to :role
12
20
  belongs_to :site, class_name: "Comfy::Cms::Site", foreign_key: :site_id
@@ -20,6 +28,10 @@ class Cms::Fortress::User < ActiveRecord::Base
20
28
  }
21
29
  end
22
30
 
31
+ def self.find_for_authentication(warden_conditions)
32
+ where(:email => warden_conditions[:email], :site_id => warden_conditions[:site_id]).first || where(:email => warden_conditions[:email]).first
33
+ end
34
+
23
35
  def type
24
36
  self.class.types[type_id]
25
37
  end
@@ -27,4 +39,15 @@ class Cms::Fortress::User < ActiveRecord::Base
27
39
  def display_name
28
40
  "#{ email } (#{ type.to_s.titleize })"
29
41
  end
42
+
43
+ protected
44
+
45
+ def password_required?
46
+ !persisted? || !password.nil? || !password_confirmation.nil?
47
+ end
48
+
49
+ def email_required?
50
+ true
51
+ end
52
+
30
53
  end
@@ -65,6 +65,6 @@
65
65
  %span.caret
66
66
  %ul.dropdown-menu(role="menu")
67
67
  %li
68
- = link_to t('cms.fortress.logout'), destroy_cms_fortress_user_session_path, :method => 'get'
68
+ = link_to t('cms.fortress.logout'), destroy_cms_fortress_user_session_path, :method => 'delete'
69
69
 
70
70
 
@@ -10,6 +10,9 @@
10
10
  .form-group
11
11
  = f.label :password
12
12
  = f.password_field :password, :placeholder => t('cms.fortress.users.sessions.new.password'), :class => "form-control"
13
+ .form-group
14
+ = f.label :site
15
+ = f.select :site_id, Comfy::Cms::Site.all.collect{ |s| [s.label, s.id] }, :class => "form-control"
13
16
 
14
17
  - if devise_mapping.rememberable?
15
18
  .checkbox
@@ -3,20 +3,26 @@
3
3
  %title= settings.title
4
4
  = csrf_meta_tag
5
5
 
6
- = stylesheet_link_tag 'comfy/admin/cms/application'
7
-
8
- = stylesheet_link_tag "cms/fortress/admin_overrides"
6
+ = stylesheet_link_tag 'comfy/admin/cms/application', 'data-turbolinks-track' => true
7
+ = stylesheet_link_tag "cms/fortress/admin_overrides", 'data-turbolinks-track' => true
9
8
 
10
9
  - unless default_theme?
11
10
  = stylesheet_link_tag "cms/fortress/themes/#{ theme_name }"
12
11
 
13
12
 
14
- = javascript_include_tag 'comfy/admin/cms/application'
15
- = javascript_include_tag 'cms/fortress/media'
13
+ = javascript_include_tag 'comfy/admin/cms/application', 'data-turbolinks-track' => true
14
+ = javascript_include_tag 'cms/fortress/media', 'data-turbolinks-track' => true
16
15
 
17
16
  - unless default_theme?
18
17
  = javascript_include_tag "cms/fortress/themes/#{ theme_name }"
19
18
 
19
+ - if @site && @site.persisted? && !settings.use_tinymce
20
+
21
+ :javascript
22
+ CMS.file_upload_path = '#{comfy_admin_cms_site_files_path(@site)}';
23
+ CMS.pages_path = '#{comfy_admin_cms_site_pages_path(@site)}';
24
+ CMS.locale = '#{I18n.locale}';
25
+
20
26
 
21
27
  = yield :head
22
28
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "cms-fortress"
5
- s.version = "1.3.6"
5
+ s.version = "1.3.7"
6
6
 
7
7
  s.authors = ["Melvin Sembrano"]
8
- s.date = "2015-01-24"
8
+ s.date = "2015-03-21"
9
9
  s.description = "Comfortable Mexican Sofa (CMS) - User and role management extension"
10
10
  s.email = "melvinsembrano@gmail.com"
11
11
  s.extra_rdoc_files = [ "LICENSE.txt", "README.rdoc" ]
@@ -1,6 +1,7 @@
1
1
  default: &default
2
2
  title: "CMS Fortress"
3
3
  title_link: "#"
4
+ use_tinymce: true
4
5
 
5
6
  development:
6
7
  <<: *default
@@ -147,4 +147,4 @@ da:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -133,14 +133,14 @@ de:
133
133
  slug: URL-Pfad
134
134
 
135
135
  login:
136
- forgot_your_password: Forgot your password?
137
- send_me_reset_password_instructions: Send me reset password instructions
138
- change_your_password: Change your password
139
- new_password: New password
140
- confirm_new_password: Confirm new password
141
- change_my_password: Change my password
142
- log_in: Log in
143
- sign_up: Sign up
144
- didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
145
- didnt_receive_unlock_instructions: Didn't receive unlock instructions?
146
- sign_in_with: Sign in with #{provider.to_s.titleize}
136
+ forgot_your_password: Passwort vergessen?
137
+ send_me_reset_password_instructions: Passwort-Reset Anweisungen senden
138
+ change_your_password: Ändern Sie Ihr Passwort
139
+ new_password: neues Passwort
140
+ confirm_new_password: Neuse Passwort bestätigen
141
+ change_my_password: Passwort ändern
142
+ log_in: Einloggen
143
+ sign_up: Registrieren
144
+ didnt_receive_confirmation_instructions: Sie haben keine Passwort-Reset Anweisungen erhalten?
145
+ didnt_receive_unlock_instructions: Sie haben keine Anweisungen zum entsperren erhalten?
146
+ sign_in_with: Anmelden mit #{provider.to_s.titleize}
@@ -0,0 +1,58 @@
1
+ de:
2
+ devise:
3
+ confirmations:
4
+ confirmed: "Vielen Dank für Ihre Registrierung. Bitte melden Sie sich jetzt an."
5
+ confirmed_and_signed_in: "Vielen Dank für Ihre Registrierung. Sie sind jetzt angemeldet."
6
+ send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail, mit der Sie Ihre Registrierung bestätigen können."
7
+ send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert erhalten Sie in wenigen Minuten eine E-Mail mit der Sie Ihre Registrierung bestätigen können."
8
+ failure:
9
+ already_authenticated: "Sie sind bereits angemeldet."
10
+ inactive: "Ihr Account ist nicht aktiv."
11
+ invalid: "Ungültige Anmeldedaten."
12
+ invalid_token: "Der Anmelde-Token ist ungültig."
13
+ locked: "Ihr Account ist gesperrt."
14
+ not_found_in_database: "E-Mail-Adresse oder Passwort ungültig."
15
+ timeout: "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an."
16
+ unauthenticated: "Sie müssen sich anmelden oder registrieren, bevor Sie fortfahren können."
17
+ unconfirmed: "Sie müssen Ihren Account bestätigen, bevor Sie fortfahren können."
18
+ mailer:
19
+ confirmation_instructions:
20
+ subject: "Anleitung zur Bestätigung Ihres Accounts"
21
+ reset_password_instructions:
22
+ subject: "Anleitung um Ihr Passwort zurückzusetzen"
23
+ unlock_instructions:
24
+ subject: "Anleitung um Ihren Account freizuschalten"
25
+ omniauth_callbacks:
26
+ failure: "Sie konnten nicht mit Ihrem %{kind}-Account angemeldet werden, weil '%{reason}'."
27
+ success: "Sie haben sich erfolgreich mit Ihrem %{kind}-Account angemeldet."
28
+ passwords:
29
+ no_token: "Sie können diese Seite nur von dem Link aus einer E-Mail zum Passwort-Zurücksetzen aufrufen. Wenn Sie einen solchen Link aufgerufen haben, stellen Sie bitte sicher, dass Sie die vollständige Adresse aufrufen."
30
+ send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie Ihr Passwort zurücksetzen können."
31
+ send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert erhalten Sie in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie Ihr Passwort zurücksetzen können."
32
+ updated: "Ihr Passwort wurde geändert. Sie sind jetzt angemeldet."
33
+ updated_not_active: "Ihr Passwort wurde geändert."
34
+ registrations:
35
+ destroyed: "Ihr Account wurde gelöscht."
36
+ signed_up: "Sie haben sich erfolgreich registriert."
37
+ signed_up_but_inactive: "Sie haben sich erfolgreich registriert. Wir konnten Sie noch nicht anmelden, da Ihr Account inaktiv ist."
38
+ signed_up_but_locked: "Sie haben sich erfolgreich registriert. Wir konnten Sie noch nicht anmelden, da Ihr Account gesperrt ist."
39
+ signed_up_but_unconfirmed: "Sie haben sich erfolgreich registriert. Wir konnten Sie noch nicht anmelden, da Ihr Account noch nicht bestätigt ist. Sie erhalten in Kürze eine E-Mail mit der Anleitung, wie Sie Ihren Account freischalten können."
40
+ update_needs_confirmation: "Ihre Daten wurden aktualisiert, aber Sie müssen Ihre neue E-Mail-Adresse bestätigen. Sie erhalten in wenigen Minuten eine E-Mail, mit der Sie die Änderung Ihrer E-Mail-Adresse abschliessen können."
41
+ updated: "Ihre Daten wurden aktualisiert."
42
+ sessions:
43
+ signed_in: "Erfolgreich angemeldet."
44
+ signed_out: "Erfolgreich abgemeldet."
45
+ unlocks:
46
+ send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie Ihren Account entsperren können."
47
+ send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert erhalten Sie in wenigen Minuten eine E-Mail mit der Anleitung, wie Sie Ihren Account entsperren können."
48
+ unlocked: "Ihr Account wurde entsperrt. Sie sind jetzt angemeldet."
49
+ errors:
50
+ messages:
51
+ already_confirmed: "wurde bereits bestätigt"
52
+ confirmation_period_expired: "muss innerhalb %{period} bestätigt werden, bitte fordern Sie einen neuen Link an"
53
+ expired: "ist abgelaufen, bitte neu anfordern"
54
+ not_found: "nicht gefunden"
55
+ not_locked: "ist nicht gesperrt"
56
+ not_saved:
57
+ one: "Konnte %{resource} nicht speichern: ein Fehler."
58
+ other: "Konnte %{resource} nicht speichern: %{count} Fehler."
@@ -146,4 +146,4 @@ en:
146
146
  sign_up: Sign up
147
147
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
148
148
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
149
- sign_in_with: Sign in with #{provider.to_s.titleize}
149
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ es:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ fr:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ it:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ ja:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ nl:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ pl:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ pt-BR:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -148,4 +148,4 @@ ru:
148
148
  sign_up: Sign up
149
149
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
150
150
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
151
- sign_in_with: Sign in with #{provider.to_s.titleize}
151
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ sv:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -147,4 +147,4 @@ zh-CN:
147
147
  sign_up: Sign up
148
148
  didnt_receive_confirmation_instructions: Didn't receive confirmation instructions?
149
149
  didnt_receive_unlock_instructions: Didn't receive unlock instructions?
150
- sign_in_with: Sign in with #{provider.to_s.titleize}
150
+ sign_in_with: Sign in with #{provider.to_s.titleize}
@@ -0,0 +1,6 @@
1
+ class RelaxUserUniquenessOnEmailAndSiteId < ActiveRecord::Migration
2
+ def change
3
+ remove_index :cms_fortress_users, :email
4
+ add_index :cms_fortress_users, [:email, :site_id], :unique => true
5
+ end
6
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 7) do
14
+ ActiveRecord::Schema.define(version: 8) do
15
15
 
16
16
  create_table "cms_fortress_role_details", force: true do |t|
17
17
  t.string "name"
@@ -54,7 +54,7 @@ ActiveRecord::Schema.define(version: 7) do
54
54
  t.integer "site_id"
55
55
  end
56
56
 
57
- add_index "cms_fortress_users", ["email"], name: "index_cms_fortress_users_on_email", unique: true
57
+ add_index "cms_fortress_users", ["email", "site_id"], name: "index_cms_fortress_users_on_email_and_site_id", unique: true
58
58
  add_index "cms_fortress_users", ["reset_password_token"], name: "index_cms_fortress_users_on_reset_password_token", unique: true
59
59
 
60
60
  create_table "comfy_cms_blocks", force: true do |t|
@@ -46,6 +46,8 @@ module Cms
46
46
  def self.included(base)
47
47
  base.class_eval do
48
48
 
49
+ before_action :configure_permitted_parameters, if: :devise_controller?
50
+
49
51
  rescue_from CanCan::AccessDenied do |ex|
50
52
  # if cannot view page check if can on files
51
53
  if controller_name.eql?('pages')
@@ -71,6 +73,12 @@ module Cms
71
73
  end
72
74
  end
73
75
 
76
+ protected
77
+
78
+ def configure_permitted_parameters
79
+ devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:email, :password, :remember_me, :site_id) }
80
+ end
81
+
74
82
  end
75
83
  end
76
84
 
@@ -11,12 +11,12 @@ class Cms::Fortress::UpgradeGenerator < Rails::Generators::Base
11
11
  'config/cms/fortress/global_settings.yml'
12
12
  ]
13
13
  files.each do |file|
14
- copy_file file, file
14
+ copy_file file, file unless File.exist?(file)
15
15
  end
16
16
  end
17
17
 
18
18
  def done
19
- puts "\r\n\r\n!!! IMPORTANT NOTE: Review your existing users since they set to super users as default. Review and assign site roles accordingly."
19
+ # puts "\r\n\r\n!!! IMPORTANT NOTE: Review your existing users since they set to super users as default. Review and assign site roles accordingly."
20
20
  puts "Upgrade complete..."
21
21
  puts "\r\n\r\n"
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms-fortress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-24 00:00:00.000000000 Z
11
+ date: 2015-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -268,6 +268,8 @@ extra_rdoc_files:
268
268
  files:
269
269
  - ".document"
270
270
  - ".gitignore"
271
+ - ".travis.yml"
272
+ - CONTRIBUTING.rdoc
271
273
  - Gemfile
272
274
  - Gemfile.lock
273
275
  - LICENSE.txt
@@ -359,6 +361,7 @@ files:
359
361
  - config/initializers/secret_token.rb
360
362
  - config/locales/da.yml
361
363
  - config/locales/de.yml
364
+ - config/locales/devise.de.yml
362
365
  - config/locales/devise.en.yml
363
366
  - config/locales/en.yml
364
367
  - config/locales/es.yml
@@ -381,6 +384,7 @@ files:
381
384
  - db/migrate/05_add_caching_info_to_pages.rb
382
385
  - db/migrate/06_add_type_to_users.rb
383
386
  - db/migrate/07_integrate_workflow_into_cms_pages.rb
387
+ - db/migrate/08_relax_user_uniqueness_on_email_and_site_id.rb
384
388
  - db/schema.rb
385
389
  - docs/screens/compact-layout-01.png
386
390
  - docs/screens/compact-layout-02.png