diff options
| author | mo <mo.khan@gmail.com> | 2017-12-17 12:27:22 -0700 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-12-17 12:27:22 -0700 |
| commit | 4e3bb9b68aa129ea158aae5e83325323d18f2e3d (patch) | |
| tree | edfc2f84c8e07c93c16fd6e24043192c9183075b | |
| parent | 432711e87340b5df45988dda49c0444c63528cf4 (diff) | |
support decryption with multiple encryption keypairs.
| -rw-r--r-- | Gemfile | 2 | ||||
| -rw-r--r-- | Gemfile.lock | 4 | ||||
| -rw-r--r-- | app/models/certificate.rb | 2 | ||||
| -rw-r--r-- | app/views/service_providers/index.html.erb | 4 |
4 files changed, 9 insertions, 3 deletions
@@ -61,6 +61,6 @@ end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'dotenv-rails' -gem "saml-kit", '0.2.8' +gem "saml-kit", '0.2.9' gem "rails-assets-bootstrap", source: "https://rails-assets.org" gem "rails-assets-jquery", source: "https://rails-assets.org" diff --git a/Gemfile.lock b/Gemfile.lock index 58e9b20..4e30af6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -172,7 +172,7 @@ GEM ruby_dep (1.5.0) rubyzip (1.2.1) safe_yaml (1.0.4) - saml-kit (0.2.8) + saml-kit (0.2.9) activemodel (>= 4.2.0) builder (~> 3.2) nokogiri (~> 1.8) @@ -252,7 +252,7 @@ DEPENDENCIES rails-controller-testing rails_12factor rspec-rails (~> 3.6) - saml-kit (= 0.2.8) + saml-kit (= 0.2.9) sass-rails (~> 5.0) selenium-webdriver spring diff --git a/app/models/certificate.rb b/app/models/certificate.rb index 4f3be30..b19c891 100644 --- a/app/models/certificate.rb +++ b/app/models/certificate.rb @@ -1,3 +1,5 @@ class Certificate < ApplicationRecord belongs_to :metadatum + scope :signing, ->() { where(use: :signing) } + scope :encryption, ->() { where(use: :signing) } end diff --git a/app/views/service_providers/index.html.erb b/app/views/service_providers/index.html.erb index 613a399..ddd4585 100644 --- a/app/views/service_providers/index.html.erb +++ b/app/views/service_providers/index.html.erb @@ -8,12 +8,16 @@ <thead> <th></th> <th>Entity Id</th> + <th>Signing Certificates</th> + <th>Encryption Certificates</th> </thead> <tbody> <% @service_providers.each do |service_provider| %> <tr> <td><%= button_to "delete", service_provider_path(service_provider), method: :delete %></td> <td><%= link_to service_provider.entity_id, service_provider.entity_id %></td> + <td><%= service_provider.certificates.signing.count %></td> + <td><%= service_provider.certificates.encryption.count %></td> </tr> <% end %> </tbody> |
