ditty 0.7.1 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.test +2 -0
- data/.gitignore +3 -0
- data/.pryrc +2 -0
- data/.rubocop.yml +24 -8
- data/.travis.yml +4 -8
- data/CNAME +1 -0
- data/Dockerfile +18 -0
- data/Gemfile.ci +0 -15
- data/Rakefile +5 -4
- data/Readme.md +24 -2
- data/_config.yml +1 -0
- data/config.ru +4 -4
- data/ditty.gemspec +31 -20
- data/docs/CNAME +1 -0
- data/docs/_config.yml +1 -0
- data/docs/index.md +34 -0
- data/exe/ditty +2 -0
- data/lib/ditty.rb +30 -4
- data/lib/ditty/cli.rb +38 -5
- data/lib/ditty/components/ditty.rb +82 -0
- data/lib/ditty/controllers/application_controller.rb +267 -0
- data/lib/ditty/controllers/{audit_logs.rb → audit_logs_controller.rb} +5 -7
- data/lib/ditty/controllers/{auth.rb → auth_controller.rb} +56 -32
- data/lib/ditty/controllers/{component.rb → component_controller.rb} +35 -24
- data/lib/ditty/controllers/{main.rb → main_controller.rb} +7 -7
- data/lib/ditty/controllers/roles_controller.rb +23 -0
- data/lib/ditty/controllers/user_login_traits_controller.rb +46 -0
- data/lib/ditty/controllers/{users.rb → users_controller.rb} +17 -20
- data/lib/ditty/db.rb +9 -5
- data/lib/ditty/emails/base.rb +48 -34
- data/lib/ditty/generators/crud_generator.rb +114 -0
- data/lib/ditty/generators/migration_generator.rb +26 -0
- data/lib/ditty/generators/project_generator.rb +52 -0
- data/lib/ditty/helpers/authentication.rb +6 -5
- data/lib/ditty/helpers/component.rb +11 -2
- data/lib/ditty/helpers/pundit.rb +24 -8
- data/lib/ditty/helpers/response.rb +38 -15
- data/lib/ditty/helpers/views.rb +48 -6
- data/lib/ditty/listener.rb +44 -14
- data/lib/ditty/memcached.rb +8 -0
- data/lib/ditty/middleware/accept_extension.rb +4 -2
- data/lib/ditty/middleware/error_catchall.rb +4 -2
- data/lib/ditty/models/audit_log.rb +1 -0
- data/lib/ditty/models/base.rb +13 -0
- data/lib/ditty/models/identity.rb +10 -7
- data/lib/ditty/models/role.rb +2 -0
- data/lib/ditty/models/user.rb +40 -3
- data/lib/ditty/models/user_login_trait.rb +17 -0
- data/lib/ditty/policies/audit_log_policy.rb +6 -6
- data/lib/ditty/policies/role_policy.rb +3 -3
- data/lib/ditty/policies/user_login_trait_policy.rb +45 -0
- data/lib/ditty/policies/user_policy.rb +3 -3
- data/lib/ditty/rubocop.rb +3 -0
- data/lib/ditty/seed.rb +2 -0
- data/lib/ditty/services/authentication.rb +31 -15
- data/lib/ditty/services/email.rb +22 -12
- data/lib/ditty/services/logger.rb +30 -13
- data/lib/ditty/services/pagination_wrapper.rb +9 -5
- data/lib/ditty/services/settings.rb +19 -7
- data/lib/ditty/tasks/ditty.rake +127 -0
- data/lib/ditty/tasks/omniauth-ldap.rake +43 -0
- data/lib/ditty/templates/.gitignore +5 -0
- data/lib/ditty/templates/.rspec +2 -0
- data/lib/ditty/templates/.rubocop.yml +7 -0
- data/lib/ditty/templates/Rakefile +12 -0
- data/lib/ditty/templates/application.rb +12 -0
- data/lib/ditty/templates/config.ru +37 -0
- data/lib/ditty/templates/controller.rb.erb +64 -0
- data/lib/ditty/templates/env.example +4 -0
- data/lib/ditty/templates/lib/project.rb.erb +5 -0
- data/lib/ditty/templates/migration.rb.erb +7 -0
- data/lib/ditty/templates/model.rb.erb +26 -0
- data/lib/ditty/templates/pids/.empty_directory +0 -0
- data/lib/ditty/templates/policy.rb.erb +48 -0
- data/{public → lib/ditty/templates/public}/browserconfig.xml +0 -0
- data/lib/ditty/templates/public/css/sb-admin-2.min.css +10 -0
- data/lib/ditty/templates/public/css/styles.css +13 -0
- data/lib/ditty/templates/public/favicon.ico +0 -0
- data/{public → lib/ditty/templates/public}/images/apple-icon.png +0 -0
- data/{public → lib/ditty/templates/public}/images/favicon-16x16.png +0 -0
- data/{public → lib/ditty/templates/public}/images/favicon-32x32.png +0 -0
- data/{public → lib/ditty/templates/public}/images/launcher-icon-1x.png +0 -0
- data/{public → lib/ditty/templates/public}/images/launcher-icon-2x.png +0 -0
- data/{public → lib/ditty/templates/public}/images/launcher-icon-4x.png +0 -0
- data/{public → lib/ditty/templates/public}/images/mstile-150x150.png +0 -0
- data/{public → lib/ditty/templates/public}/images/safari-pinned-tab.svg +0 -0
- data/lib/ditty/templates/public/js/sb-admin-2.min.js +7 -0
- data/lib/ditty/templates/public/js/scripts.js +1 -0
- data/{public/manifest.json → lib/ditty/templates/public/manifest.json.erb} +2 -2
- data/lib/ditty/templates/settings.yml.erb +19 -0
- data/lib/ditty/templates/sidekiq.rb +18 -0
- data/lib/ditty/templates/sidekiq.yml +9 -0
- data/lib/ditty/templates/spec_helper.rb +43 -0
- data/lib/ditty/templates/type.rb.erb +21 -0
- data/lib/ditty/templates/views/display.haml.tt +20 -0
- data/lib/ditty/templates/views/edit.haml.tt +10 -0
- data/lib/ditty/templates/views/form.haml.tt +11 -0
- data/lib/ditty/templates/views/index.haml.tt +29 -0
- data/lib/ditty/templates/views/new.haml.tt +10 -0
- data/lib/ditty/version.rb +1 -1
- data/lib/rubocop/cop/ditty/call_services_directly.rb +42 -0
- data/migrate/20181209_add_user_login_traits.rb +16 -0
- data/migrate/20181209_extend_audit_log.rb +12 -0
- data/migrate/20190220_add_parent_id_to_roles.rb +9 -0
- data/spec/ditty/api_spec.rb +51 -0
- data/spec/ditty/controllers/roles_spec.rb +67 -0
- data/spec/ditty/controllers/user_login_traits_spec.rb +72 -0
- data/spec/ditty/controllers/users_spec.rb +72 -0
- data/spec/ditty/emails/base_spec.rb +76 -0
- data/spec/ditty/emails/forgot_password_spec.rb +20 -0
- data/spec/ditty/helpers/component_spec.rb +85 -0
- data/spec/ditty/models/user_spec.rb +36 -0
- data/spec/ditty/services/email_spec.rb +36 -0
- data/spec/ditty/services/logger_spec.rb +68 -0
- data/spec/ditty/services/settings_spec.rb +63 -0
- data/spec/ditty_spec.rb +9 -0
- data/spec/factories.rb +46 -0
- data/spec/fixtures/logger.yml +17 -0
- data/spec/fixtures/section.yml +3 -0
- data/spec/fixtures/settings.yml +8 -0
- data/spec/spec_helper.rb +51 -0
- data/spec/support/api_shared_examples.rb +250 -0
- data/spec/support/crud_shared_examples.rb +145 -0
- data/views/403.haml +2 -0
- data/views/404.haml +2 -4
- data/views/500.haml +11 -0
- data/views/audit_logs/index.haml +32 -28
- data/views/auth/forgot_password.haml +32 -16
- data/views/auth/identity.haml +14 -13
- data/views/auth/ldap.haml +17 -0
- data/views/auth/login.haml +23 -17
- data/views/auth/register.haml +20 -18
- data/views/auth/register_identity.haml +27 -12
- data/views/auth/reset_password.haml +36 -19
- data/views/blank.haml +43 -0
- data/views/emails/forgot_password.haml +1 -1
- data/views/emails/layouts/action.haml +10 -6
- data/views/emails/layouts/alert.haml +2 -1
- data/views/emails/layouts/billing.haml +2 -1
- data/views/embedded.haml +17 -11
- data/views/error.haml +8 -3
- data/views/index.haml +1 -1
- data/views/layout.haml +45 -30
- data/views/partials/actions.haml +15 -14
- data/views/partials/content_tag.haml +0 -0
- data/views/partials/delete_form.haml +1 -1
- data/views/partials/filter_control.haml +2 -2
- data/views/partials/footer.haml +13 -5
- data/views/partials/form_control.haml +30 -19
- data/views/partials/form_tag.haml +1 -1
- data/views/partials/navitems.haml +42 -0
- data/views/partials/notifications.haml +12 -8
- data/views/partials/pager.haml +44 -25
- data/views/partials/search.haml +15 -11
- data/views/partials/sidebar.haml +15 -37
- data/views/partials/sort_ui.haml +2 -0
- data/views/partials/timespan_selector.haml +64 -0
- data/views/partials/topbar.haml +53 -0
- data/views/partials/user_associations.haml +32 -0
- data/views/quick_start.haml +23 -0
- data/views/roles/display.haml +27 -6
- data/views/roles/edit.haml +3 -3
- data/views/roles/form.haml +1 -0
- data/views/roles/index.haml +23 -14
- data/views/roles/new.haml +2 -2
- data/views/user_login_traits/display.haml +32 -0
- data/views/user_login_traits/edit.haml +10 -0
- data/views/user_login_traits/form.haml +5 -0
- data/views/user_login_traits/index.haml +28 -0
- data/views/user_login_traits/new.haml +10 -0
- data/views/users/display.haml +15 -16
- data/views/users/edit.haml +3 -3
- data/views/users/form.haml +0 -0
- data/views/users/index.haml +31 -24
- data/views/users/login_traits.haml +25 -0
- data/views/users/new.haml +2 -2
- data/views/users/profile.haml +17 -15
- data/views/users/user.haml +1 -1
- metadata +314 -76
- data/lib/ditty/components/app.rb +0 -77
- data/lib/ditty/controllers/application.rb +0 -175
- data/lib/ditty/controllers/roles.rb +0 -16
- data/lib/ditty/rake_tasks.rb +0 -102
- data/views/partials/navbar.haml +0 -23
data/views/roles/edit.haml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
.row
|
2
2
|
.col-md-2
|
3
3
|
.col-md-8
|
4
|
-
.
|
5
|
-
.
|
6
|
-
= edit_form_tag "#{base_path}/#{entity.
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
|
+
= edit_form_tag "#{base_path}/#{entity.display_id}" do
|
7
7
|
= haml :'roles/form', locals: { entity: entity }
|
8
8
|
%button.btn.btn-primary{ type: 'submit' }
|
9
9
|
Update Role
|
data/views/roles/form.haml
CHANGED
data/views/roles/index.haml
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
.row
|
2
2
|
.col-md-12
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
%a{ href: "#{base_path}/#{entity.id}" }= entity.name
|
14
|
-
- else
|
3
|
+
= haml :'partials/search'
|
4
|
+
%table.table.table-striped.table-bordered.table-hover
|
5
|
+
%thead.thead-dark
|
6
|
+
%tr
|
7
|
+
%th= "Name#{sort_ui(:name)}"
|
8
|
+
%th Parent
|
9
|
+
%th
|
10
|
+
%tbody
|
11
|
+
- if list.count > 0
|
12
|
+
- list.all.each do |entity|
|
15
13
|
%tr
|
16
|
-
%td
|
14
|
+
%td
|
15
|
+
%a{ href: "#{base_path}/#{entity.display_id}" }= entity.name
|
16
|
+
%td
|
17
|
+
%a{ href: "#{base_path}/#{entity.parent_id}" }= entity.parent&.name || '(None)'
|
18
|
+
%td
|
19
|
+
- if policy(entity).update?
|
20
|
+
%a{ href: "#{base_path}/#{entity.display_id}/edit", title: 'Edit' }
|
21
|
+
%i.fa.fa-edit
|
22
|
+
- else
|
23
|
+
%tr
|
24
|
+
%td.text-center{ colspan: 3 } No Roles
|
17
25
|
|
18
|
-
|
26
|
+
- if list.count > 0
|
27
|
+
= pagination(list, base_path)
|
data/views/roles/new.haml
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-2
|
3
|
+
.col-md-8
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
|
+
%p.description
|
7
|
+
%label User:
|
8
|
+
= entity.user&.email || 'Unknown'
|
9
|
+
%p.description
|
10
|
+
%label IP Address:
|
11
|
+
= entity.ip_address || 'Unknown'
|
12
|
+
%p.description
|
13
|
+
%label Device:
|
14
|
+
= entity.device || 'Unknown'
|
15
|
+
%p.description
|
16
|
+
%label Platform:
|
17
|
+
= entity.platform || 'Unknown'
|
18
|
+
%p.description
|
19
|
+
%label Browser:
|
20
|
+
= entity.browser || 'Unknown'
|
21
|
+
%p.description
|
22
|
+
%label Last Seen:
|
23
|
+
= entity.updated_at.strftime('%F %T')
|
24
|
+
|
25
|
+
.row
|
26
|
+
.col-md-6
|
27
|
+
%a.btn.btn-secondary{ href: "#{base_path}/#{entity.display_id}/edit" } Edit
|
28
|
+
.col-md-6.text-right
|
29
|
+
- if policy(entity).delete?
|
30
|
+
= delete_form_tag("#{base_path}/#{entity.display_id}") do
|
31
|
+
%button.btn.btn-warning{ type: 'submit' } Delete
|
32
|
+
.col-md-2
|
@@ -0,0 +1,10 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-2
|
3
|
+
.col-md-8
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
|
+
= edit_form_tag "#{base_path}/#{entity.display_id}" do
|
7
|
+
= haml :'user_login_traits/form', locals: { entity: entity }
|
8
|
+
%button.btn.btn-primary{ type: 'submit' }
|
9
|
+
Update Login Trait
|
10
|
+
.col-md-2
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
= haml :'partials/search'
|
4
|
+
%table.table.table-striped.table-bordered.table-hover
|
5
|
+
%thead.thead-dark
|
6
|
+
%tr
|
7
|
+
%th= "User #{sort_ui(:user_id)}"
|
8
|
+
%th= "IP Address #{sort_ui(:ip_address)}"
|
9
|
+
%th= "Device #{sort_ui(:device)}"
|
10
|
+
%th= "Platform #{sort_ui(:platform)}"
|
11
|
+
%th= "Browser #{sort_ui(:browser)}"
|
12
|
+
%th= "Last Seen #{sort_ui(:updated_at)}"
|
13
|
+
%tbody
|
14
|
+
- if list.count.positive?
|
15
|
+
- list.all.each do |entity|
|
16
|
+
%tr
|
17
|
+
%td= entity.user&.email || 'Unknown'
|
18
|
+
%td
|
19
|
+
%a{ href: "#{base_path}/#{entity.display_id}" }= entity.ip_address || 'Unknown'
|
20
|
+
%td= entity.device || 'Unknown'
|
21
|
+
%td= entity.platform || 'Unknown'
|
22
|
+
%td= entity.browser || 'Unknown'
|
23
|
+
%td= entity.updated_at
|
24
|
+
- else
|
25
|
+
%tr
|
26
|
+
%td.text-center{ colspan: 6 } No records
|
27
|
+
|
28
|
+
=pagination(list, base_path)
|
data/views/users/display.haml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
.row
|
1
|
+
.row.mb-4
|
2
2
|
.col-md-2
|
3
3
|
.col-md-8
|
4
|
-
.
|
5
|
-
.
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
6
|
.author
|
7
|
-
%img.
|
8
|
-
%h4= entity.
|
7
|
+
%img.float-right.img-thumbnail{ src: entity.gravatar }
|
8
|
+
%h4= entity.display_name
|
9
9
|
|
10
10
|
%hr
|
11
11
|
%p.description
|
12
12
|
%label Name:
|
13
|
-
= entity.name
|
13
|
+
= entity.name || '(None)'
|
14
14
|
%p.description
|
15
15
|
%label Surname:
|
16
|
-
= entity.surname
|
16
|
+
= entity.surname || '(None)'
|
17
17
|
%p.description
|
18
18
|
%label Roles:
|
19
19
|
= entity.roles_dataset.map(:name).map(&:titlecase).join(', ')
|
@@ -24,26 +24,25 @@
|
|
24
24
|
.row
|
25
25
|
.col-md-6
|
26
26
|
- if policy(entity).update?
|
27
|
-
%a.btn.btn-
|
27
|
+
%a.btn.btn-secondary{ href: "#{base_path}/#{entity.display_id}/edit" } Edit
|
28
28
|
.col-md-6.text-right
|
29
29
|
- if policy(entity).delete?
|
30
|
-
= delete_form_tag("#{base_path}/#{entity.
|
30
|
+
= delete_form_tag("#{base_path}/#{entity.display_id}") do
|
31
31
|
%button.btn.btn-warning{ type: 'submit' } Delete
|
32
32
|
.col-md-2
|
33
33
|
|
34
34
|
- if entity.identity.first
|
35
|
-
.row
|
35
|
+
.row.mb-4
|
36
36
|
.col-md-2
|
37
37
|
.col-md-8
|
38
|
-
.
|
39
|
-
.
|
40
|
-
%h4 Change Password
|
41
|
-
|
42
|
-
= edit_form_tag("#{base_path}/#{entity.id}/identity") do
|
38
|
+
.card.card-default.shadow
|
39
|
+
.card-body
|
40
|
+
%h4.card-title Change Password
|
41
|
+
= edit_form_tag("#{base_path}/#{entity.display_id}/identity") do
|
43
42
|
= form_control(:password, entity.identity.first, type: 'password', placeholder: 'Your password', group: 'identity')
|
44
43
|
= form_control(:password_confirmation, entity.identity.first, type: 'password', label: 'Confirm Password', placeholder: 'Confirm your password', group: 'identity')
|
45
44
|
%button.btn.btn-primary{ type: 'submit' }
|
46
45
|
Change Password
|
47
46
|
.col-md-2
|
48
47
|
|
49
|
-
|
48
|
+
= haml :'users/login_traits', locals: { user_login_traits: entity.user_login_traits }
|
data/views/users/edit.haml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
.row
|
2
2
|
.col-md-2
|
3
3
|
.col-md-8
|
4
|
-
.
|
5
|
-
.
|
6
|
-
= edit_form_tag "#{base_path}/#{entity.
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
|
+
= edit_form_tag "#{base_path}/#{entity.display_id}" do
|
7
7
|
= haml :'users/user', locals: { user: entity }
|
8
8
|
%button.btn.btn-primary{ type: 'submit' }
|
9
9
|
Update User
|
File without changes
|
data/views/users/index.haml
CHANGED
@@ -1,28 +1,35 @@
|
|
1
1
|
.row
|
2
2
|
.col-md-12
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
%
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
-
|
16
|
-
- list.all.each do |entity|
|
17
|
-
%tr
|
18
|
-
%td
|
19
|
-
%a{ href: "#{base_path}/#{entity.id}" }= entity.email
|
20
|
-
%td= entity.name
|
21
|
-
%td= entity.surname
|
22
|
-
%td= entity.roles_dataset.map(:name).map(&:titlecase).join(', ')
|
23
|
-
%td= entity.created_at.strftime('%Y-%m-%d')
|
24
|
-
- else
|
3
|
+
= haml :'partials/search'
|
4
|
+
%table.table.table-striped.table-bordered.table-hover
|
5
|
+
%thead.thead-dark
|
6
|
+
%tr
|
7
|
+
%th= "Email #{sort_ui(:email)}"
|
8
|
+
%th= "Name #{sort_ui(:name)}"
|
9
|
+
%th= "Surname #{sort_ui(:surname)}"
|
10
|
+
%th Roles
|
11
|
+
%th= "Signed Up #{sort_ui(:created_at)}"
|
12
|
+
%th
|
13
|
+
%tbody
|
14
|
+
- if list.count > 0
|
15
|
+
- list.all.each do |entity|
|
25
16
|
%tr
|
26
|
-
%td
|
17
|
+
%td
|
18
|
+
- if policy(entity).read?
|
19
|
+
%a{ href: "#{base_path}/#{entity.display_id}" }= entity.email
|
20
|
+
- else
|
21
|
+
= entity.email
|
22
|
+
%td= entity.name
|
23
|
+
%td= entity.surname
|
24
|
+
%td= entity.all_roles.map(&:name).map(&:titlecase).join(', ')
|
25
|
+
%td= entity.created_at.strftime('%Y-%m-%d')
|
26
|
+
%td
|
27
|
+
- if policy(entity).update?
|
28
|
+
%a{ href: "#{base_path}/#{entity.display_id}/edit", title: 'Edit' }
|
29
|
+
%i.fa.fa-edit
|
30
|
+
- else
|
31
|
+
%tr
|
32
|
+
%td.text-center{ colspan: 6 } No records
|
27
33
|
|
28
|
-
|
34
|
+
- if list.count > 0
|
35
|
+
= pagination(list, base_path)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
.card.card-default.shadow
|
4
|
+
.card-body
|
5
|
+
%h4.card-title Logins
|
6
|
+
%table.table.table-striped.mb-0
|
7
|
+
%thead.thead-dark
|
8
|
+
%tr
|
9
|
+
%th IP Address
|
10
|
+
%th Device
|
11
|
+
%th Platform
|
12
|
+
%th Browser
|
13
|
+
%th Last Seen
|
14
|
+
%tbody
|
15
|
+
- if user_login_traits.count.positive?
|
16
|
+
- user_login_traits.each do |trait|
|
17
|
+
%tr
|
18
|
+
%td= trait.ip_address
|
19
|
+
%td= trait.device
|
20
|
+
%td= trait.platform
|
21
|
+
%td= trait.browser
|
22
|
+
%td= trait.updated_at.strftime('%F %T')
|
23
|
+
- else
|
24
|
+
%tr
|
25
|
+
%td.text-center{ colspan: 5 } No Records
|
data/views/users/new.haml
CHANGED
data/views/users/profile.haml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
.row
|
1
|
+
.row.mb-4
|
2
2
|
.col-md-2
|
3
3
|
.col-md-8
|
4
|
-
.
|
5
|
-
.
|
4
|
+
.card.card-default.shadow
|
5
|
+
.card-body
|
6
6
|
.author
|
7
|
-
%img.
|
7
|
+
%img.float-right.img-thumbnail{ src: entity.gravatar }
|
8
8
|
%h4= entity.email
|
9
9
|
|
10
10
|
%hr
|
11
11
|
%p.description
|
12
12
|
%label Name:
|
13
|
-
= entity.name
|
13
|
+
= entity.name || '(None)'
|
14
14
|
%p.description
|
15
15
|
%label Surname:
|
16
|
-
= entity.surname
|
16
|
+
= entity.surname || '(None)'
|
17
17
|
%p.description
|
18
18
|
%label Roles:
|
19
19
|
= entity.roles_dataset.map(:name).map(&:titlecase).join(', ')
|
@@ -23,24 +23,26 @@
|
|
23
23
|
.row
|
24
24
|
.col-md-6
|
25
25
|
- if policy(entity).update?
|
26
|
-
%a.btn.btn-
|
26
|
+
%a.btn.btn-secondary{ href: "#{base_path}/#{entity.display_id}/edit" } Edit
|
27
27
|
.col-md-6.text-right
|
28
28
|
- if policy(entity).delete?
|
29
|
-
= delete_form_tag("#{base_path}/#{entity.
|
29
|
+
= delete_form_tag("#{base_path}/#{entity.display_id}") do
|
30
30
|
%button.btn.btn-warning{ type: 'submit' } Delete
|
31
31
|
.col-md-2
|
32
32
|
|
33
|
-
.row
|
33
|
+
.row.mb-4
|
34
34
|
.col-md-2
|
35
35
|
.col-md-8
|
36
|
-
.
|
37
|
-
.
|
38
|
-
%h4 Change Password
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
.card.card-default.shadow
|
37
|
+
.card-body
|
38
|
+
%h4.card-title Change Password
|
39
|
+
= edit_form_tag("#{base_path}/#{entity.display_id}/identity") do
|
40
|
+
- if current_user.super_admin? == false
|
41
|
+
= form_control(:old_password, identity, type: 'password', placeholder: 'Your current password', value: '')
|
42
42
|
= form_control(:password, identity, type: 'password', placeholder: 'Your new password')
|
43
43
|
= form_control(:password_confirmation, identity, type: 'password', label: 'Confirm Password', placeholder: 'Confirm your password')
|
44
44
|
%button.btn.btn-primary{ type: 'submit' }
|
45
45
|
Change Password
|
46
46
|
.col-md-2
|
47
|
+
|
48
|
+
= haml :'users/login_traits', locals: { user_login_traits: entity.user_login_traits }
|
data/views/users/user.haml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
= form_control(:name, user)
|
2
2
|
= form_control(:surname, user)
|
3
3
|
- if policy(user).permitted_attributes.include? :role_id
|
4
|
-
= form_control(:role_id, user, type: 'select', options: Ditty::Role.order(:name).as_hash(:id, :name), name: 'user[role_id][]',
|
4
|
+
= form_control(:role_id, user, type: 'select', options: Ditty::Role.order(:name).as_hash(:id, :name), name: 'user[role_id][]', value: user.new? ? [] : user.roles_dataset.map(:id), multiple: true)
|
metadata
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ditty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurgens du Toit
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: dotenv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: database_cleaner
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: factory_bot
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: faker
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rack-test
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rspec
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +122,104 @@ dependencies:
|
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-performance
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop-sequel
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop-thread_safety
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: simplecov
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 0.13.0
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.13.0
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: sqlite3
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
97
223
|
- !ruby/object:Gem::Dependency
|
98
224
|
name: timecop
|
99
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,84 +240,112 @@ dependencies:
|
|
114
240
|
requirements:
|
115
241
|
- - ">="
|
116
242
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
243
|
+
version: '6'
|
118
244
|
type: :runtime
|
119
245
|
prerelease: false
|
120
246
|
version_requirements: !ruby/object:Gem::Requirement
|
121
247
|
requirements:
|
122
248
|
- - ">="
|
123
249
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
250
|
+
version: '6'
|
125
251
|
- !ruby/object:Gem::Dependency
|
126
252
|
name: bcrypt
|
127
253
|
requirement: !ruby/object:Gem::Requirement
|
128
254
|
requirements:
|
129
|
-
- - "
|
255
|
+
- - ">="
|
130
256
|
- !ruby/object:Gem::Version
|
131
257
|
version: '3.1'
|
132
258
|
type: :runtime
|
133
259
|
prerelease: false
|
134
260
|
version_requirements: !ruby/object:Gem::Requirement
|
135
261
|
requirements:
|
136
|
-
- - "
|
262
|
+
- - ">="
|
137
263
|
- !ruby/object:Gem::Version
|
138
264
|
version: '3.1'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: browser
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '5.3'
|
272
|
+
type: :runtime
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '5.3'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: dotenv
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '2'
|
286
|
+
type: :runtime
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '2'
|
139
293
|
- !ruby/object:Gem::Dependency
|
140
294
|
name: haml
|
141
295
|
requirement: !ruby/object:Gem::Requirement
|
142
296
|
requirements:
|
143
|
-
- - "
|
297
|
+
- - ">="
|
144
298
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
299
|
+
version: 5.1.2
|
146
300
|
type: :runtime
|
147
301
|
prerelease: false
|
148
302
|
version_requirements: !ruby/object:Gem::Requirement
|
149
303
|
requirements:
|
150
|
-
- - "
|
304
|
+
- - ">="
|
151
305
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
306
|
+
version: 5.1.2
|
153
307
|
- !ruby/object:Gem::Dependency
|
154
308
|
name: logger
|
155
309
|
requirement: !ruby/object:Gem::Requirement
|
156
310
|
requirements:
|
157
|
-
- - "
|
311
|
+
- - ">="
|
158
312
|
- !ruby/object:Gem::Version
|
159
313
|
version: '1.0'
|
160
314
|
type: :runtime
|
161
315
|
prerelease: false
|
162
316
|
version_requirements: !ruby/object:Gem::Requirement
|
163
317
|
requirements:
|
164
|
-
- - "
|
318
|
+
- - ">="
|
165
319
|
- !ruby/object:Gem::Version
|
166
320
|
version: '1.0'
|
167
321
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
322
|
+
name: mail
|
169
323
|
requirement: !ruby/object:Gem::Requirement
|
170
324
|
requirements:
|
171
325
|
- - ">="
|
172
326
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
327
|
+
version: '1.7'
|
174
328
|
type: :runtime
|
175
329
|
prerelease: false
|
176
330
|
version_requirements: !ruby/object:Gem::Requirement
|
177
331
|
requirements:
|
178
332
|
- - ">="
|
179
333
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
334
|
+
version: '1.7'
|
181
335
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
336
|
+
name: oga
|
183
337
|
requirement: !ruby/object:Gem::Requirement
|
184
338
|
requirements:
|
185
339
|
- - ">="
|
186
340
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
341
|
+
version: '2.14'
|
188
342
|
type: :runtime
|
189
343
|
prerelease: false
|
190
344
|
version_requirements: !ruby/object:Gem::Requirement
|
191
345
|
requirements:
|
192
346
|
- - ">="
|
193
347
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
348
|
+
version: '2.14'
|
195
349
|
- !ruby/object:Gem::Dependency
|
196
350
|
name: omniauth
|
197
351
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,142 +392,142 @@ dependencies:
|
|
238
392
|
name: rack-contrib
|
239
393
|
requirement: !ruby/object:Gem::Requirement
|
240
394
|
requirements:
|
241
|
-
- - "
|
395
|
+
- - ">="
|
242
396
|
- !ruby/object:Gem::Version
|
243
|
-
version: '
|
397
|
+
version: '2.0'
|
244
398
|
type: :runtime
|
245
399
|
prerelease: false
|
246
400
|
version_requirements: !ruby/object:Gem::Requirement
|
247
401
|
requirements:
|
248
|
-
- - "
|
402
|
+
- - ">="
|
249
403
|
- !ruby/object:Gem::Version
|
250
|
-
version: '
|
404
|
+
version: '2.0'
|
251
405
|
- !ruby/object:Gem::Dependency
|
252
406
|
name: rack_csrf
|
253
407
|
requirement: !ruby/object:Gem::Requirement
|
254
408
|
requirements:
|
255
|
-
- - "
|
409
|
+
- - ">="
|
256
410
|
- !ruby/object:Gem::Version
|
257
|
-
version: '
|
411
|
+
version: '2.0'
|
258
412
|
type: :runtime
|
259
413
|
prerelease: false
|
260
414
|
version_requirements: !ruby/object:Gem::Requirement
|
261
415
|
requirements:
|
262
|
-
- - "
|
416
|
+
- - ">="
|
263
417
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
418
|
+
version: '2.0'
|
265
419
|
- !ruby/object:Gem::Dependency
|
266
420
|
name: rake
|
267
421
|
requirement: !ruby/object:Gem::Requirement
|
268
422
|
requirements:
|
269
|
-
- - "
|
423
|
+
- - ">="
|
270
424
|
- !ruby/object:Gem::Version
|
271
|
-
version: '
|
425
|
+
version: '13.0'
|
272
426
|
type: :runtime
|
273
427
|
prerelease: false
|
274
428
|
version_requirements: !ruby/object:Gem::Requirement
|
275
429
|
requirements:
|
276
|
-
- - "
|
430
|
+
- - ">="
|
277
431
|
- !ruby/object:Gem::Version
|
278
|
-
version: '
|
432
|
+
version: '13.0'
|
279
433
|
- !ruby/object:Gem::Dependency
|
280
434
|
name: sequel
|
281
435
|
requirement: !ruby/object:Gem::Requirement
|
282
436
|
requirements:
|
283
437
|
- - ">="
|
284
438
|
- !ruby/object:Gem::Version
|
285
|
-
version: '
|
439
|
+
version: '5.0'
|
286
440
|
type: :runtime
|
287
441
|
prerelease: false
|
288
442
|
version_requirements: !ruby/object:Gem::Requirement
|
289
443
|
requirements:
|
290
444
|
- - ">="
|
291
445
|
- !ruby/object:Gem::Version
|
292
|
-
version: '
|
446
|
+
version: '5.0'
|
293
447
|
- !ruby/object:Gem::Dependency
|
294
448
|
name: sinatra
|
295
449
|
requirement: !ruby/object:Gem::Requirement
|
296
450
|
requirements:
|
297
451
|
- - ">="
|
298
452
|
- !ruby/object:Gem::Version
|
299
|
-
version: '2.
|
453
|
+
version: '2.1'
|
300
454
|
type: :runtime
|
301
455
|
prerelease: false
|
302
456
|
version_requirements: !ruby/object:Gem::Requirement
|
303
457
|
requirements:
|
304
458
|
- - ">="
|
305
459
|
- !ruby/object:Gem::Version
|
306
|
-
version: '2.
|
460
|
+
version: '2.1'
|
307
461
|
- !ruby/object:Gem::Dependency
|
308
462
|
name: sinatra-contrib
|
309
463
|
requirement: !ruby/object:Gem::Requirement
|
310
464
|
requirements:
|
311
|
-
- - "
|
465
|
+
- - ">="
|
312
466
|
- !ruby/object:Gem::Version
|
313
467
|
version: '2.0'
|
314
468
|
type: :runtime
|
315
469
|
prerelease: false
|
316
470
|
version_requirements: !ruby/object:Gem::Requirement
|
317
471
|
requirements:
|
318
|
-
- - "
|
472
|
+
- - ">="
|
319
473
|
- !ruby/object:Gem::Version
|
320
474
|
version: '2.0'
|
321
475
|
- !ruby/object:Gem::Dependency
|
322
476
|
name: sinatra-flash
|
323
477
|
requirement: !ruby/object:Gem::Requirement
|
324
478
|
requirements:
|
325
|
-
- - "
|
479
|
+
- - ">="
|
326
480
|
- !ruby/object:Gem::Version
|
327
481
|
version: '0.3'
|
328
482
|
type: :runtime
|
329
483
|
prerelease: false
|
330
484
|
version_requirements: !ruby/object:Gem::Requirement
|
331
485
|
requirements:
|
332
|
-
- - "
|
486
|
+
- - ">="
|
333
487
|
- !ruby/object:Gem::Version
|
334
488
|
version: '0.3'
|
335
489
|
- !ruby/object:Gem::Dependency
|
336
490
|
name: sinatra-param
|
337
491
|
requirement: !ruby/object:Gem::Requirement
|
338
492
|
requirements:
|
339
|
-
- - "
|
493
|
+
- - ">="
|
340
494
|
- !ruby/object:Gem::Version
|
341
|
-
version: '1.
|
495
|
+
version: '1.6'
|
342
496
|
type: :runtime
|
343
497
|
prerelease: false
|
344
498
|
version_requirements: !ruby/object:Gem::Requirement
|
345
499
|
requirements:
|
346
|
-
- - "
|
500
|
+
- - ">="
|
347
501
|
- !ruby/object:Gem::Version
|
348
|
-
version: '1.
|
502
|
+
version: '1.6'
|
349
503
|
- !ruby/object:Gem::Dependency
|
350
|
-
name:
|
504
|
+
name: thor
|
351
505
|
requirement: !ruby/object:Gem::Requirement
|
352
506
|
requirements:
|
353
507
|
- - ">="
|
354
508
|
- !ruby/object:Gem::Version
|
355
|
-
version: '
|
509
|
+
version: '0.20'
|
356
510
|
type: :runtime
|
357
511
|
prerelease: false
|
358
512
|
version_requirements: !ruby/object:Gem::Requirement
|
359
513
|
requirements:
|
360
514
|
- - ">="
|
361
515
|
- !ruby/object:Gem::Version
|
362
|
-
version: '
|
516
|
+
version: '0.20'
|
363
517
|
- !ruby/object:Gem::Dependency
|
364
|
-
name:
|
518
|
+
name: tilt
|
365
519
|
requirement: !ruby/object:Gem::Requirement
|
366
520
|
requirements:
|
367
521
|
- - ">="
|
368
522
|
- !ruby/object:Gem::Version
|
369
|
-
version: '
|
523
|
+
version: '2'
|
370
524
|
type: :runtime
|
371
525
|
prerelease: false
|
372
526
|
version_requirements: !ruby/object:Gem::Requirement
|
373
527
|
requirements:
|
374
528
|
- - ">="
|
375
529
|
- !ruby/object:Gem::Version
|
376
|
-
version: '
|
530
|
+
version: '2'
|
377
531
|
- !ruby/object:Gem::Dependency
|
378
532
|
name: will_paginate
|
379
533
|
requirement: !ruby/object:Gem::Requirement
|
@@ -410,38 +564,50 @@ executables:
|
|
410
564
|
extensions: []
|
411
565
|
extra_rdoc_files: []
|
412
566
|
files:
|
567
|
+
- ".env.test"
|
413
568
|
- ".gitignore"
|
414
569
|
- ".pryrc"
|
415
570
|
- ".rspec"
|
416
571
|
- ".rubocop.yml"
|
417
572
|
- ".travis.yml"
|
573
|
+
- CNAME
|
418
574
|
- Contributors.md
|
575
|
+
- Dockerfile
|
419
576
|
- Gemfile.ci
|
420
577
|
- License.txt
|
421
578
|
- Rakefile
|
422
579
|
- Readme.md
|
580
|
+
- _config.yml
|
423
581
|
- config.ru
|
424
582
|
- ditty.gemspec
|
583
|
+
- docs/CNAME
|
584
|
+
- docs/_config.yml
|
585
|
+
- docs/index.md
|
425
586
|
- exe/ditty
|
426
587
|
- lib/ditty.rb
|
427
588
|
- lib/ditty/cli.rb
|
428
|
-
- lib/ditty/components/
|
429
|
-
- lib/ditty/controllers/
|
430
|
-
- lib/ditty/controllers/
|
431
|
-
- lib/ditty/controllers/
|
432
|
-
- lib/ditty/controllers/
|
433
|
-
- lib/ditty/controllers/
|
434
|
-
- lib/ditty/controllers/
|
435
|
-
- lib/ditty/controllers/
|
589
|
+
- lib/ditty/components/ditty.rb
|
590
|
+
- lib/ditty/controllers/application_controller.rb
|
591
|
+
- lib/ditty/controllers/audit_logs_controller.rb
|
592
|
+
- lib/ditty/controllers/auth_controller.rb
|
593
|
+
- lib/ditty/controllers/component_controller.rb
|
594
|
+
- lib/ditty/controllers/main_controller.rb
|
595
|
+
- lib/ditty/controllers/roles_controller.rb
|
596
|
+
- lib/ditty/controllers/user_login_traits_controller.rb
|
597
|
+
- lib/ditty/controllers/users_controller.rb
|
436
598
|
- lib/ditty/db.rb
|
437
599
|
- lib/ditty/emails/base.rb
|
438
600
|
- lib/ditty/emails/forgot_password.rb
|
601
|
+
- lib/ditty/generators/crud_generator.rb
|
602
|
+
- lib/ditty/generators/migration_generator.rb
|
603
|
+
- lib/ditty/generators/project_generator.rb
|
439
604
|
- lib/ditty/helpers/authentication.rb
|
440
605
|
- lib/ditty/helpers/component.rb
|
441
606
|
- lib/ditty/helpers/pundit.rb
|
442
607
|
- lib/ditty/helpers/response.rb
|
443
608
|
- lib/ditty/helpers/views.rb
|
444
609
|
- lib/ditty/listener.rb
|
610
|
+
- lib/ditty/memcached.rb
|
445
611
|
- lib/ditty/middleware/accept_extension.rb
|
446
612
|
- lib/ditty/middleware/error_catchall.rb
|
447
613
|
- lib/ditty/models/audit_log.rb
|
@@ -449,42 +615,102 @@ files:
|
|
449
615
|
- lib/ditty/models/identity.rb
|
450
616
|
- lib/ditty/models/role.rb
|
451
617
|
- lib/ditty/models/user.rb
|
618
|
+
- lib/ditty/models/user_login_trait.rb
|
452
619
|
- lib/ditty/policies/application_policy.rb
|
453
620
|
- lib/ditty/policies/audit_log_policy.rb
|
454
621
|
- lib/ditty/policies/identity_policy.rb
|
455
622
|
- lib/ditty/policies/role_policy.rb
|
623
|
+
- lib/ditty/policies/user_login_trait_policy.rb
|
456
624
|
- lib/ditty/policies/user_policy.rb
|
457
|
-
- lib/ditty/
|
625
|
+
- lib/ditty/rubocop.rb
|
458
626
|
- lib/ditty/seed.rb
|
459
627
|
- lib/ditty/services/authentication.rb
|
460
628
|
- lib/ditty/services/email.rb
|
461
629
|
- lib/ditty/services/logger.rb
|
462
630
|
- lib/ditty/services/pagination_wrapper.rb
|
463
631
|
- lib/ditty/services/settings.rb
|
632
|
+
- lib/ditty/tasks/ditty.rake
|
633
|
+
- lib/ditty/tasks/omniauth-ldap.rake
|
634
|
+
- lib/ditty/templates/.gitignore
|
635
|
+
- lib/ditty/templates/.rspec
|
636
|
+
- lib/ditty/templates/.rubocop.yml
|
637
|
+
- lib/ditty/templates/Rakefile
|
638
|
+
- lib/ditty/templates/application.rb
|
639
|
+
- lib/ditty/templates/config.ru
|
640
|
+
- lib/ditty/templates/controller.rb.erb
|
641
|
+
- lib/ditty/templates/env.example
|
642
|
+
- lib/ditty/templates/lib/project.rb.erb
|
643
|
+
- lib/ditty/templates/logs/.empty_directory
|
644
|
+
- lib/ditty/templates/migration.rb.erb
|
645
|
+
- lib/ditty/templates/model.rb.erb
|
646
|
+
- lib/ditty/templates/pids/.empty_directory
|
647
|
+
- lib/ditty/templates/policy.rb.erb
|
648
|
+
- lib/ditty/templates/public/browserconfig.xml
|
649
|
+
- lib/ditty/templates/public/css/sb-admin-2.min.css
|
650
|
+
- lib/ditty/templates/public/css/styles.css
|
651
|
+
- lib/ditty/templates/public/favicon.ico
|
652
|
+
- lib/ditty/templates/public/images/apple-icon.png
|
653
|
+
- lib/ditty/templates/public/images/favicon-16x16.png
|
654
|
+
- lib/ditty/templates/public/images/favicon-32x32.png
|
655
|
+
- lib/ditty/templates/public/images/launcher-icon-1x.png
|
656
|
+
- lib/ditty/templates/public/images/launcher-icon-2x.png
|
657
|
+
- lib/ditty/templates/public/images/launcher-icon-4x.png
|
658
|
+
- lib/ditty/templates/public/images/mstile-150x150.png
|
659
|
+
- lib/ditty/templates/public/images/safari-pinned-tab.svg
|
660
|
+
- lib/ditty/templates/public/js/sb-admin-2.min.js
|
661
|
+
- lib/ditty/templates/public/js/scripts.js
|
662
|
+
- lib/ditty/templates/public/manifest.json.erb
|
663
|
+
- lib/ditty/templates/settings.yml.erb
|
664
|
+
- lib/ditty/templates/sidekiq.rb
|
665
|
+
- lib/ditty/templates/sidekiq.yml
|
666
|
+
- lib/ditty/templates/spec_helper.rb
|
667
|
+
- lib/ditty/templates/type.rb.erb
|
668
|
+
- lib/ditty/templates/views/display.haml.tt
|
669
|
+
- lib/ditty/templates/views/edit.haml.tt
|
670
|
+
- lib/ditty/templates/views/form.haml.tt
|
671
|
+
- lib/ditty/templates/views/index.haml.tt
|
672
|
+
- lib/ditty/templates/views/new.haml.tt
|
464
673
|
- lib/ditty/version.rb
|
674
|
+
- lib/rubocop/cop/ditty/call_services_directly.rb
|
465
675
|
- migrate/20170207_base_tables.rb
|
466
676
|
- migrate/20170208_audit_log.rb
|
467
677
|
- migrate/20170416_audit_log_details.rb
|
468
678
|
- migrate/20180307_password_reset.rb
|
469
|
-
-
|
470
|
-
-
|
471
|
-
-
|
472
|
-
-
|
473
|
-
-
|
474
|
-
-
|
475
|
-
-
|
476
|
-
-
|
477
|
-
-
|
478
|
-
-
|
679
|
+
- migrate/20181209_add_user_login_traits.rb
|
680
|
+
- migrate/20181209_extend_audit_log.rb
|
681
|
+
- migrate/20190220_add_parent_id_to_roles.rb
|
682
|
+
- spec/ditty/api_spec.rb
|
683
|
+
- spec/ditty/controllers/roles_spec.rb
|
684
|
+
- spec/ditty/controllers/user_login_traits_spec.rb
|
685
|
+
- spec/ditty/controllers/users_spec.rb
|
686
|
+
- spec/ditty/emails/base_spec.rb
|
687
|
+
- spec/ditty/emails/forgot_password_spec.rb
|
688
|
+
- spec/ditty/helpers/component_spec.rb
|
689
|
+
- spec/ditty/models/user_spec.rb
|
690
|
+
- spec/ditty/services/email_spec.rb
|
691
|
+
- spec/ditty/services/logger_spec.rb
|
692
|
+
- spec/ditty/services/settings_spec.rb
|
693
|
+
- spec/ditty_spec.rb
|
694
|
+
- spec/factories.rb
|
695
|
+
- spec/fixtures/logger.yml
|
696
|
+
- spec/fixtures/section.yml
|
697
|
+
- spec/fixtures/settings.yml
|
698
|
+
- spec/spec_helper.rb
|
699
|
+
- spec/support/api_shared_examples.rb
|
700
|
+
- spec/support/crud_shared_examples.rb
|
479
701
|
- views/400.haml
|
702
|
+
- views/403.haml
|
480
703
|
- views/404.haml
|
704
|
+
- views/500.haml
|
481
705
|
- views/audit_logs/index.haml
|
482
706
|
- views/auth/forgot_password.haml
|
483
707
|
- views/auth/identity.haml
|
708
|
+
- views/auth/ldap.haml
|
484
709
|
- views/auth/login.haml
|
485
710
|
- views/auth/register.haml
|
486
711
|
- views/auth/register_identity.haml
|
487
712
|
- views/auth/reset_password.haml
|
713
|
+
- views/blank.haml
|
488
714
|
- views/emails/base.haml
|
489
715
|
- views/emails/forgot_password.haml
|
490
716
|
- views/emails/layouts/action.haml
|
@@ -495,25 +721,38 @@ files:
|
|
495
721
|
- views/index.haml
|
496
722
|
- views/layout.haml
|
497
723
|
- views/partials/actions.haml
|
724
|
+
- views/partials/content_tag.haml
|
498
725
|
- views/partials/delete_form.haml
|
499
726
|
- views/partials/filter_control.haml
|
500
727
|
- views/partials/footer.haml
|
501
728
|
- views/partials/form_control.haml
|
502
729
|
- views/partials/form_tag.haml
|
503
|
-
- views/partials/
|
730
|
+
- views/partials/navitems.haml
|
504
731
|
- views/partials/notifications.haml
|
505
732
|
- views/partials/pager.haml
|
506
733
|
- views/partials/search.haml
|
507
734
|
- views/partials/sidebar.haml
|
735
|
+
- views/partials/sort_ui.haml
|
736
|
+
- views/partials/timespan_selector.haml
|
737
|
+
- views/partials/topbar.haml
|
738
|
+
- views/partials/user_associations.haml
|
739
|
+
- views/quick_start.haml
|
508
740
|
- views/roles/display.haml
|
509
741
|
- views/roles/edit.haml
|
510
742
|
- views/roles/form.haml
|
511
743
|
- views/roles/index.haml
|
512
744
|
- views/roles/new.haml
|
745
|
+
- views/user_login_traits/display.haml
|
746
|
+
- views/user_login_traits/edit.haml
|
747
|
+
- views/user_login_traits/form.haml
|
748
|
+
- views/user_login_traits/index.haml
|
749
|
+
- views/user_login_traits/new.haml
|
513
750
|
- views/users/display.haml
|
514
751
|
- views/users/edit.haml
|
752
|
+
- views/users/form.haml
|
515
753
|
- views/users/identity.haml
|
516
754
|
- views/users/index.haml
|
755
|
+
- views/users/login_traits.haml
|
517
756
|
- views/users/new.haml
|
518
757
|
- views/users/profile.haml
|
519
758
|
- views/users/user.haml
|
@@ -536,8 +775,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
536
775
|
- !ruby/object:Gem::Version
|
537
776
|
version: '0'
|
538
777
|
requirements: []
|
539
|
-
|
540
|
-
rubygems_version: 2.7.7
|
778
|
+
rubygems_version: 3.0.8
|
541
779
|
signing_key:
|
542
780
|
specification_version: 4
|
543
781
|
summary: Sinatra Based Application Framework
|