lesli 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Rakefile +3 -0
- data/app/assets/config/lesli_manifest.js +53 -0
- data/app/assets/fonts/lesli/Domine/Domine-Bold.ttf +0 -0
- data/app/assets/fonts/lesli/Domine/Domine-Regular.ttf +0 -0
- data/app/assets/fonts/lesli/Domine/OFL.txt +95 -0
- data/app/assets/fonts/lesli/MaterialDesign/icons.woff2 +0 -0
- data/app/assets/fonts/lesli/Montserrat/Montserrat-Variable.ttf +0 -0
- data/app/assets/fonts/lesli/OpenSans/OpenSans-Variable.ttf +0 -0
- data/app/assets/fonts/lesli/Remix/remixicon.eot +0 -0
- data/app/assets/fonts/lesli/Remix/remixicon.glyph.json +1 -0
- data/app/assets/fonts/lesli/Remix/remixicon.svg +7633 -0
- data/app/assets/fonts/lesli/Remix/remixicon.symbol.svg +11 -0
- data/app/assets/fonts/lesli/Remix/remixicon.ttf +0 -0
- data/app/assets/fonts/lesli/Remix/remixicon.woff +0 -0
- data/app/assets/fonts/lesli/Remix/remixicon.woff2 +0 -0
- data/app/assets/fonts/lesli/Roboto/LICENSE.txt +202 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Black.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-BlackItalic.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Bold.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-BoldItalic.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Italic.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Light.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-LightItalic.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Medium.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-MediumItalic.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Regular.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-Thin.ttf +0 -0
- data/app/assets/fonts/lesli/Roboto/Roboto-ThinItalic.ttf +0 -0
- data/app/assets/icons/lesli/cloud-admin.svg +1 -0
- data/app/assets/icons/lesli/cloud-audit.svg +1 -0
- data/app/assets/icons/lesli/cloud-babel.svg +1 -0
- data/app/assets/icons/lesli/cloud-bell.svg +1 -0
- data/app/assets/icons/lesli/cloud-books.svg +1 -0
- data/app/assets/icons/lesli/cloud-development.svg +1 -0
- data/app/assets/icons/lesli/cloud-dispatcher.svg +1 -0
- data/app/assets/icons/lesli/cloud-driver.svg +1 -0
- data/app/assets/icons/lesli/cloud-focus.svg +1 -0
- data/app/assets/icons/lesli/cloud-help.svg +1 -0
- data/app/assets/icons/lesli/cloud-kb.svg +1 -0
- data/app/assets/icons/lesli/cloud-leaf.svg +1 -0
- data/app/assets/icons/lesli/cloud-lesli.svg +1 -0
- data/app/assets/icons/lesli/cloud-mailer.svg +1 -0
- data/app/assets/icons/lesli/cloud-one.svg +1 -0
- data/app/assets/icons/lesli/cloud-profile.svg +1 -0
- data/app/assets/icons/lesli/cloud-proposal.svg +1 -0
- data/app/assets/icons/lesli/cloud-scraper.svg +1 -0
- data/app/assets/icons/lesli/cloud-shared.svg +1 -0
- data/app/assets/icons/lesli/cloud-storage.svg +1 -0
- data/app/assets/icons/lesli/cloud-talk.svg +1 -0
- data/app/assets/icons/lesli/cloud-team.svg +1 -0
- data/app/assets/icons/lesli/cloud-time.svg +1 -0
- data/app/assets/icons/lesli/cloud-vault.svg +1 -0
- data/app/assets/icons/lesli/cloud-word.svg +1 -0
- data/app/assets/icons/lesli/icon-module.svg +1 -0
- data/app/assets/icons/lesli/logo-android.svg +1 -0
- data/app/assets/icons/lesli/logo-bulma.svg +1 -0
- data/app/assets/icons/lesli/logo-ios.svg +1 -0
- data/app/assets/icons/lesli/logo-linux.svg +1 -0
- data/app/assets/icons/lesli/logo-mac.svg +1 -0
- data/app/assets/icons/lesli/logo-module.svg +1 -0
- data/app/assets/icons/lesli/logo-postgresql.svg +1 -0
- data/app/assets/icons/lesli/logo-rails.svg +1 -0
- data/app/assets/icons/lesli/logo-ruby.svg +1 -0
- data/app/assets/icons/lesli/logo-sass.svg +1 -0
- data/app/assets/icons/lesli/logo-vue.svg +1 -0
- data/app/assets/icons/lesli/logo-web.svg +1 -0
- data/app/assets/icons/lesli/logo-windows.svg +1 -0
- data/app/assets/icons/readme.md +10 -0
- data/app/assets/images/lesli/brand/app-auth.svg +9 -0
- data/app/assets/images/lesli/brand/app-icon.svg +42 -0
- data/app/assets/images/lesli/brand/app-logo.svg +4 -0
- data/app/assets/images/lesli/brand/favicon.png +0 -0
- data/app/assets/images/lesli/brand/favicon.svg +61 -0
- data/app/assets/images/lesli/brand/login-background.jpg +0 -0
- data/app/assets/javascripts/lesli/users/sessions.js +786 -0
- data/app/assets/stylesheets/lesli/users/confirmations.scss +34 -0
- data/app/assets/stylesheets/lesli/users/devise.scss +32 -0
- data/app/assets/stylesheets/lesli/users/oauth.scss +34 -0
- data/app/assets/stylesheets/lesli/users/passwords.scss +34 -0
- data/app/assets/stylesheets/lesli/users/registrations.scss +34 -0
- data/app/assets/stylesheets/lesli/users/sessions.scss +38 -0
- data/app/controllers/lesli/application_controller.rb +108 -0
- data/app/controllers/lesli/application_devise_controller.rb +54 -0
- data/app/controllers/lesli/application_lesli_controller.rb +61 -0
- data/app/controllers/lesli/interfaces/application/authorization.rb +107 -0
- data/app/controllers/lesli/interfaces/application/customization.rb +46 -0
- data/app/controllers/lesli/interfaces/application/logger.rb +133 -0
- data/app/controllers/lesli/interfaces/application/requester.rb +84 -0
- data/app/controllers/lesli/interfaces/application/responder.rb +132 -0
- data/app/controllers/lesli/profiles_controller.rb +60 -0
- data/app/controllers/users/confirmations_controller.rb +30 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
- data/app/controllers/users/passwords_controller.rb +34 -0
- data/app/controllers/users/registrations_controller.rb +62 -0
- data/app/controllers/users/sessions_controller.rb +142 -0
- data/app/controllers/users/unlocks_controller.rb +30 -0
- data/app/helpers/lesli/assets_helper.rb +92 -0
- data/app/helpers/lesli/customization_helper.rb +84 -0
- data/app/helpers/lesli/general_helper.rb +83 -0
- data/app/helpers/lesli/navigation_helper.rb +349 -0
- data/app/helpers/lesli/profiles_helper.rb +4 -0
- data/app/helpers/lesli/system_helper.rb +57 -0
- data/app/lib/date2.rb +192 -0
- data/app/lib/lesli/system.rb +80 -0
- data/app/models/concerns/account_engines.rb +249 -0
- data/app/models/concerns/user_activities.rb +163 -0
- data/app/models/concerns/user_extensions.rb +129 -0
- data/app/models/concerns/user_guard.rb +278 -0
- data/app/models/concerns/user_polyfill.rb +134 -0
- data/app/models/lesli/account/log.rb +57 -0
- data/app/models/lesli/account.rb +76 -0
- data/app/models/lesli/application_lesli_record.rb +37 -0
- data/app/models/lesli/profile.rb +4 -0
- data/app/models/lesli/system_controller/action.rb +37 -0
- data/app/models/lesli/system_controller.rb +37 -0
- data/app/models/lesli/user/agent.rb +37 -0
- data/app/models/lesli/user/log.rb +38 -0
- data/app/models/lesli/user/request.rb +37 -0
- data/app/models/lesli/user/session.rb +105 -0
- data/app/models/lesli/user.rb +162 -0
- data/app/services/lesli/application_lesli_service.rb +168 -0
- data/app/services/lesli/user/session_service.rb +62 -0
- data/app/validators/lesli/application_lesli_validator.rb +67 -0
- data/app/validators/lesli/users_validator.rb +217 -0
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +25 -0
- data/app/views/devise/passwords/new.html.erb +16 -0
- data/app/views/devise/registrations/edit.html.erb +43 -0
- data/app/views/devise/registrations/new.html.erb +29 -0
- data/app/views/devise/sessions/new.html.erb +178 -0
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/lesli/devise/sessions/_form.html.erb +17 -0
- data/app/views/lesli/devise/sessions/_session.html.erb +2 -0
- data/app/views/lesli/devise/sessions/edit.html.erb +10 -0
- data/app/views/lesli/devise/sessions/index.html.erb +14 -0
- data/app/views/lesli/devise/sessions/new.html.erb +9 -0
- data/app/views/lesli/devise/sessions/show.html.erb +10 -0
- data/app/views/lesli/layouts/application-devise.html.erb +58 -0
- data/app/views/lesli/layouts/application-lesli.html.erb +57 -0
- data/app/views/lesli/layouts/application-public.html.erb +59 -0
- data/app/views/lesli/partials/_application-analytics.html.erb +71 -0
- data/app/views/lesli/partials/_application-data.html.erb +102 -0
- data/app/views/lesli/partials/_application-head.html.erb +56 -0
- data/app/views/lesli/partials/_application-lesli-chatbox.html.erb +35 -0
- data/app/views/lesli/partials/_application-lesli-content.html.erb +35 -0
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +83 -0
- data/app/views/lesli/partials/_application-lesli-footer.html.erb +82 -0
- data/app/views/lesli/partials/_application-lesli-header.html.erb +79 -0
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -0
- data/app/views/lesli/partials/_application-lesli-javascript.html.erb +57 -0
- data/app/views/lesli/partials/_application-lesli-navigation.html.erb +52 -0
- data/app/views/lesli/partials/_application-lesli-notices.html.erb +43 -0
- data/app/views/lesli/partials/_application-lesli-panels.html.erb +58 -0
- data/app/views/lesli/partials/_application-lesli-scss.html.erb +60 -0
- data/app/views/lesli/partials/_application-lesli-sidebar.html.erb +50 -0
- data/app/views/lesli/partials/_application-public-footer.html.erb +51 -0
- data/app/views/lesli/partials/_application-public-javascript.html.erb +51 -0
- data/app/views/lesli/partials/_application-public-scss.html.erb +35 -0
- data/app/views/lesli/profiles/_form.html.erb +17 -0
- data/app/views/lesli/profiles/_profile.html.erb +2 -0
- data/app/views/lesli/profiles/edit.html.erb +10 -0
- data/app/views/lesli/profiles/index.html.erb +14 -0
- data/app/views/lesli/profiles/new.html.erb +9 -0
- data/app/views/lesli/profiles/show.html.erb +10 -0
- data/app/views/lesli/wrappers/_application-auth.html.erb +65 -0
- data/config/initializers/devise.rb +334 -0
- data/config/initializers/lesli_defaults.rb +100 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/routes.rb +52 -0
- data/db/migrate/v1.0/0010000110_create_lesli_accounts.rb +70 -0
- data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +59 -0
- data/db/migrate/v1.0/0010000310_create_lesli_users.rb +97 -0
- data/db/migrate/v1.0/0010000610_create_lesli_system_controllers.rb +44 -0
- data/db/migrate/v1.0/0010000710_create_lesli_system_controller_actions.rb +43 -0
- data/db/migrate/v1.0/0010001210_create_lesli_account_activities.rb +50 -0
- data/db/migrate/v1.0/0010001310_create_lesli_account_logs.rb +45 -0
- data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +51 -0
- data/db/migrate/v1.0/0010003310_create_lesli_user_requests.rb +48 -0
- data/db/migrate/v1.0/0010003610_create_lesli_user_logs.rb +45 -0
- data/db/migrate/v1.0/0010004010_create_lesli_user_agents.rb +46 -0
- data/db/seed/development/accounts.rb +47 -0
- data/db/seed/development/users.rb +53 -0
- data/db/seed/development.rb +35 -0
- data/db/seed/production.rb +35 -0
- data/db/seed/test.rb +35 -0
- data/db/seed/tools.rb +60 -0
- data/db/seeds.rb +64 -0
- data/db/structure/00000000_locations.json +32 -0
- data/db/structure/00000000_people.json +34 -0
- data/db/structure/00000003_actions.json +14 -0
- data/db/structure/00000004_activities.json +20 -0
- data/db/structure/00000005_discussions.json +8 -0
- data/db/structure/00000006_files.json +32 -0
- data/db/structure/00000007_subscribers.json +11 -0
- data/db/structure/00000008_custom_fields.json +8 -0
- data/db/structure/00000201_workflows.json +17 -0
- data/db/structure/00000202_workflow_statuses.json +24 -0
- data/db/structure/00000203_workflow_associations.json +14 -0
- data/db/structure/00000204_workflow_actions.json +39 -0
- data/db/structure/00000205_workflow_checks.json +27 -0
- data/db/structure/00000301_custom_fields.json +38 -0
- data/db/structure/00000401_custom_validations.json +14 -0
- data/db/structure/00000402_custom_validation_rules.json +23 -0
- data/db/structure/00000403_custom_validation_fields.json +14 -0
- data/db/structure/00000501_dashboards.json +14 -0
- data/db/structure/00000502_dashboard_components.json +23 -0
- data/db/tables/0010001010_create_account_settings.rb +42 -0
- data/db/tables/0010001110_create_account_locations.rb +64 -0
- data/db/tables/0010001410_create_account_files.rb +52 -0
- data/db/tables/0010001510_create_account_currencies.rb +48 -0
- data/db/tables/0010001610_create_account_currency_exchange_rates.rb +54 -0
- data/db/tables/0010003010_create_user_details.rb +49 -0
- data/db/tables/0010003110_create_user_settings.rb +44 -0
- data/db/tables/0010003410_create_user_activities.rb +51 -0
- data/db/tables/0010003510_create_user_roles.rb +43 -0
- data/db/tables/0010003710_create_user_codes.rb +43 -0
- data/db/tables/0010003810_create_user_shortcuts.rb +46 -0
- data/db/tables/0010004110_create_user_tokens.rb +45 -0
- data/db/tables/0010005010_create_descriptors.rb +45 -0
- data/db/tables/0010005110_create_descriptor_privileges.rb +44 -0
- data/db/tables/0010005210_create_descriptor_activities.rb +51 -0
- data/db/tables/0010005510_create_role_descriptors.rb +44 -0
- data/db/tables/0010005610_create_role_activities.rb +50 -0
- data/db/tables/0010005710_create_role_privileges.rb +45 -0
- data/db/tables/0010009010_create_feedbacks.rb +56 -0
- data/lib/assets/javascripts/lesli/i18n.js +1095 -0
- data/lib/assets/javascripts/lesli/translations.js +15 -0
- data/lib/lesli/configuration.rb +45 -0
- data/lib/lesli/engine.rb +62 -0
- data/lib/lesli/version.rb +34 -0
- data/lib/lesli.rb +6 -0
- data/lib/sass/lesli/bulma/loader.scss +84 -0
- data/lib/sass/lesli/cloud-objects/discussion.scss +77 -0
- data/lib/sass/lesli/cloud-objects/file.scss +138 -0
- data/lib/sass/lesli/components/editor-richtext.scss +78 -0
- data/lib/sass/lesli/components/keypad.scss +109 -0
- data/lib/sass/lesli/devise/confirmations.scss.erb +75 -0
- data/lib/sass/lesli/devise/passwords.scss.erb +86 -0
- data/lib/sass/lesli/devise/registrations.scss.erb +50 -0
- data/lib/sass/lesli/devise/sessions.scss +36 -0
- data/lib/sass/lesli/elements/autocomplete.scss +72 -0
- data/lib/sass/lesli/elements/avatar.scss +48 -0
- data/lib/sass/lesli/elements/calendar.scss +47 -0
- data/lib/sass/lesli/elements/card.scss +37 -0
- data/lib/sass/lesli/elements/content.scss +37 -0
- data/lib/sass/lesli/elements/empty.scss +43 -0
- data/lib/sass/lesli/elements/file-uploader.scss +74 -0
- data/lib/sass/lesli/elements/form.scss +43 -0
- data/lib/sass/lesli/elements/gallery.scss +98 -0
- data/lib/sass/lesli/elements/header.scss +44 -0
- data/lib/sass/lesli/elements/input-tag.scss +73 -0
- data/lib/sass/lesli/elements/loading.scss +63 -0
- data/lib/sass/lesli/elements/map.scss +107 -0
- data/lib/sass/lesli/elements/msg.scss +77 -0
- data/lib/sass/lesli/elements/navbar.scss +115 -0
- data/lib/sass/lesli/elements/panel.scss +65 -0
- data/lib/sass/lesli/elements/tab.scss +48 -0
- data/lib/sass/lesli/elements/table.scss +118 -0
- data/lib/sass/lesli/elements/toggle.scss +102 -0
- data/lib/sass/lesli/elements/toolbar.scss +66 -0
- data/lib/sass/lesli/fonts/families.scss +47 -0
- data/lib/sass/lesli/fonts/mdicons.scss +84 -0
- data/lib/sass/lesli/fonts/remixicons.scss +2602 -0
- data/lib/sass/lesli/helpers/display.scss +44 -0
- data/lib/sass/lesli/helpers/tooltip.scss +91 -0
- data/lib/sass/lesli/layouts/application-announcements.scss +40 -0
- data/lib/sass/lesli/layouts/application-component.scss +50 -0
- data/lib/sass/lesli/layouts/application-engines.scss +155 -0
- data/lib/sass/lesli/layouts/application-footer.scss +102 -0
- data/lib/sass/lesli/layouts/application-header.scss +152 -0
- data/lib/sass/lesli/layouts/application-navbar.scss +61 -0
- data/lib/sass/lesli/layouts/application-search.scss +71 -0
- data/lib/sass/lesli/layouts/application-sidebar.scss +219 -0
- data/lib/sass/lesli/overrides/sweetalert.scss +106 -0
- data/lib/sass/lesli/pages/dashboards.scss +57 -0
- data/lib/sass/lesli/pages/invites.scss +81 -0
- data/lib/sass/lesli/pages/mfas.scss +36 -0
- data/lib/sass/lesli/pages/otps.scss +36 -0
- data/lib/sass/lesli/pages/passes.scss +35 -0
- data/lib/sass/lesli/panels/panel-announcements.scss +56 -0
- data/lib/sass/lesli/panels/panel-notification.scss +67 -0
- data/lib/sass/lesli/panels/panel-profile.scss +62 -0
- data/lib/sass/lesli/panels/panel-tasks.scss +41 -0
- data/lib/sass/lesli/panels/panel-ticket.scss +57 -0
- data/lib/sass/lesli/settings/variables.scss +148 -0
- data/lib/sass/lesli/shared/workflow-status-progress.scss +135 -0
- data/lib/sass/lesli/templates/application.scss +141 -0
- data/lib/sass/lesli/templates/dashboards.scss +32 -0
- data/lib/sass/lesli/templates/devise.scss +185 -0
- data/lib/sass/lesli/templates/empty.scss +42 -0
- data/lib/sass/lesli/templates/pdf.scss +45 -0
- data/lib/sass/lesli/templates/public.scss +71 -0
- data/lib/tasks/db.rb +75 -0
- data/lib/tasks/lesli/controllers.rake +103 -0
- data/lib/tasks/lesli_tasks.rake +23 -0
- data/lib/vue/application.js +269 -0
- data/lib/vue/apps/cloudobjects/action.vue +193 -0
- data/lib/vue/apps/cloudobjects/discussion/content.vue +60 -0
- data/lib/vue/apps/cloudobjects/discussion/element.vue +132 -0
- data/lib/vue/apps/cloudobjects/discussion/filters.vue +108 -0
- data/lib/vue/apps/cloudobjects/discussion/new.vue +130 -0
- data/lib/vue/apps/cloudobjects/discussion.vue +98 -0
- data/lib/vue/apps/cloudobjects/file/grid.vue +215 -0
- data/lib/vue/apps/cloudobjects/file/list.vue +106 -0
- data/lib/vue/apps/cloudobjects/file.vue +145 -0
- data/lib/vue/apps/dashboards/apps/edit.vue +105 -0
- data/lib/vue/apps/dashboards/apps/index.vue +114 -0
- data/lib/vue/apps/dashboards/apps/new.vue +89 -0
- data/lib/vue/apps/dashboards/apps/show.vue +76 -0
- data/lib/vue/apps/dashboards/components/form.vue +267 -0
- data/lib/vue/apps/dashboards/components/preview.vue +172 -0
- data/lib/vue/apps/workflows2/apps/actions/form.vue +232 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/chatroom-form.vue +103 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/cloud-object-clone-form.vue +125 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/cloud-object-file-form.vue +102 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/email-form.vue +190 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/notification-form.vue +124 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/send-cloud-object-file.vue +170 -0
- data/lib/vue/apps/workflows2/apps/actions/forms/task-form.vue +258 -0
- data/lib/vue/apps/workflows2/apps/actions/index.vue +146 -0
- data/lib/vue/apps/workflows2/apps/checks/form.vue +200 -0
- data/lib/vue/apps/workflows2/apps/checks/index.vue +160 -0
- data/lib/vue/apps/workflows2/apps/index.vue +177 -0
- data/lib/vue/apps/workflows2/apps/new.vue +97 -0
- data/lib/vue/apps/workflows2/apps/show.vue +146 -0
- data/lib/vue/apps/workflows2/components/associations.vue +215 -0
- data/lib/vue/apps/workflows2/components/chart.vue +91 -0
- data/lib/vue/apps/workflows2/components/workflow-form.vue +466 -0
- data/lib/vue/apps/workflows2/components/workflow-status-dropdown.vue +129 -0
- data/lib/vue/devise/confirmations.js +33 -0
- data/lib/vue/devise/passwords.js +137 -0
- data/lib/vue/devise/registrations.js +162 -0
- data/lib/vue/devise/sessions.js +143 -0
- data/lib/vue/layouts/application-announcements.vue +78 -0
- data/lib/vue/layouts/application-engines.vue +66 -0
- data/lib/vue/layouts/application-footer.vue +123 -0
- data/lib/vue/layouts/application-header.vue +213 -0
- data/lib/vue/layouts/application-navbar.vue +110 -0
- data/lib/vue/layouts/application-search.vue +86 -0
- data/lib/vue/layouts/application-sidebar.vue +63 -0
- data/lib/vue/layouts/dashboard-component.vue +62 -0
- data/lib/vue/pages/errors/app.js +32 -0
- data/lib/vue/pages/invites/app.js +76 -0
- data/lib/vue/pages/mfas/application.js +77 -0
- data/lib/vue/pages/onboarding/application.js +45 -0
- data/lib/vue/pages/onboarding/components/address.vue +120 -0
- data/lib/vue/pages/onboarding/components/buttons.vue +67 -0
- data/lib/vue/pages/onboarding/components/contact.vue +148 -0
- data/lib/vue/pages/onboarding/components/date-time.vue +265 -0
- data/lib/vue/pages/onboarding/components/finish.vue +62 -0
- data/lib/vue/pages/onboarding/components/general-info.vue +93 -0
- data/lib/vue/pages/onboarding/components/indicators.vue +78 -0
- data/lib/vue/pages/onboarding/components/welcome.vue +66 -0
- data/lib/vue/pages/onboarding/show.vue +67 -0
- data/lib/vue/pages/onboarding/store.js +165 -0
- data/lib/vue/pages/otps/application.js +90 -0
- data/lib/vue/pages/passes/application.js +80 -0
- data/lib/vue/pages/websites/application.js +34 -0
- data/lib/vue/panels/panel-announcements.vue +248 -0
- data/lib/vue/panels/panel-files.vue +281 -0
- data/lib/vue/panels/panel-notifications.vue +106 -0
- data/lib/vue/panels/panel-profile.vue +76 -0
- data/lib/vue/panels/panel-tasks.vue +124 -0
- data/lib/vue/panels/panel-tickets.vue +181 -0
- data/lib/vue/public.js +85 -0
- data/lib/vue/stores/announcements.js +75 -0
- data/lib/vue/stores/cloud-bell/notification.js +114 -0
- data/lib/vue/stores/cloudobjects/action.js +181 -0
- data/lib/vue/stores/cloudobjects/discussion.js +221 -0
- data/lib/vue/stores/cloudobjects/file.js +205 -0
- data/lib/vue/stores/dashboard.js +251 -0
- data/lib/vue/stores/firebase.js +163 -0
- data/lib/vue/stores/layout.js +60 -0
- data/lib/vue/stores/panels/announcements.js +153 -0
- data/lib/vue/stores/panels/task.js +66 -0
- data/lib/vue/stores/panels/tickets.js +129 -0
- data/lib/vue/stores/profile.js +90 -0
- data/lib/vue/stores/search.js +154 -0
- data/lib/vue/stores/services/translator.js +87 -0
- data/lib/vue/stores/workflow.js +185 -0
- data/lib/vue/stores/workflow2.js +345 -0
- data/lib/vue/stores/workflows/actions.js +327 -0
- data/lib/vue/stores/workflows/associations.js +130 -0
- data/lib/vue/stores/workflows/checks.js +210 -0
- data/lib/webpack/base.js +182 -0
- data/lib/webpack/core.js +80 -0
- data/lib/webpack/engines.js +162 -0
- data/license +674 -0
- data/readme.md +120 -0
- metadata +554 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
+
|
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
21
|
+
|
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
|
23
|
+
Building a better future, one line of code at a time.
|
|
24
|
+
|
|
25
|
+
@contact hello@lesli.tech
|
|
26
|
+
@website https://www.lesli.tech
|
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
+
|
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// ·
|
|
31
|
+
=end
|
|
32
|
+
|
|
33
|
+
module Lesli
|
|
34
|
+
module Interfaces
|
|
35
|
+
module Application
|
|
36
|
+
module Logger
|
|
37
|
+
def get_user_agent(as_string=true)
|
|
38
|
+
|
|
39
|
+
http_user_agent = request.env["HTTP_USER_AGENT"]
|
|
40
|
+
|
|
41
|
+
# parse user agent
|
|
42
|
+
user_agent = UserAgent.parse(http_user_agent)
|
|
43
|
+
|
|
44
|
+
user_agent_version = user_agent.version.to_a.first(2).join(".")
|
|
45
|
+
|
|
46
|
+
# return user agent as object
|
|
47
|
+
if as_string == false
|
|
48
|
+
return {
|
|
49
|
+
platform: user_agent.platform,
|
|
50
|
+
os: user_agent.os,
|
|
51
|
+
browser: user_agent.browser,
|
|
52
|
+
version: user_agent_version
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# return user agent info as string
|
|
57
|
+
"#{user_agent.platform} #{user_agent.os} - #{user_agent.browser} #{user_agent_version}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Track all user activity
|
|
61
|
+
# this is disabled by default in the settings file
|
|
62
|
+
def log_user_requests
|
|
63
|
+
return unless Lesli.config.security.dig(:enable_analytics)
|
|
64
|
+
return unless current_user
|
|
65
|
+
return unless session[:user_session_id]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Try to save a unique record for this request configuration
|
|
69
|
+
current_user.requests.upsert(
|
|
70
|
+
{
|
|
71
|
+
request_controller: controller_path,
|
|
72
|
+
request_action: action_name,
|
|
73
|
+
request_method: request.method,
|
|
74
|
+
request_count: 1,
|
|
75
|
+
session_id: session[:user_session_id]
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
# group of columns to consider a request as unique
|
|
79
|
+
unique_by: %i[request_controller request_action user_id session_id],
|
|
80
|
+
|
|
81
|
+
# if request id is not unique, increase the counter for this configuration
|
|
82
|
+
on_duplicate: Arel.sql("request_count = lesli_user_requests.request_count + 1")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# update the last used date for the current session
|
|
86
|
+
#current_user.sessions.where(id: session[:user_session_id]).first&.touch(:last_used_at)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Track user agents
|
|
90
|
+
# this is disabled by default in the settings file
|
|
91
|
+
def log_user_agent
|
|
92
|
+
return unless Lesli.config.security.dig(:enable_analytics)
|
|
93
|
+
return unless current_user
|
|
94
|
+
return unless session[:user_session_id]
|
|
95
|
+
|
|
96
|
+
user_agent = get_user_agent(false)
|
|
97
|
+
|
|
98
|
+
# Try to save a unique record for this agent configuration
|
|
99
|
+
current_user.agents.upsert(
|
|
100
|
+
{
|
|
101
|
+
os: user_agent[:os] || "unknown",
|
|
102
|
+
platform: user_agent[:platform] || "unknown",
|
|
103
|
+
browser: user_agent[:browser] || "unknown",
|
|
104
|
+
version: user_agent[:version] || "unknown",
|
|
105
|
+
count: 1
|
|
106
|
+
},
|
|
107
|
+
# group of columns to consider a agent as unique
|
|
108
|
+
unique_by: %i[platform os browser version user_id],
|
|
109
|
+
|
|
110
|
+
# if request id is not unique, increase the counter for this configuration
|
|
111
|
+
on_duplicate: Arel.sql("count = lesli_user_agents.count + 1")
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Track specific account activity
|
|
116
|
+
# this is disabled by default in the settings file
|
|
117
|
+
def log_account_activity(system_module, system_process, title = nil, payload = nil, description = nil)
|
|
118
|
+
return unless Rails.application.config.lesli.dig(:security, :enable_analytics)
|
|
119
|
+
|
|
120
|
+
account = Account.first
|
|
121
|
+
|
|
122
|
+
account.activities.create({
|
|
123
|
+
system_module:,
|
|
124
|
+
system_process:,
|
|
125
|
+
description:,
|
|
126
|
+
payload:,
|
|
127
|
+
title:
|
|
128
|
+
})
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
+
|
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
21
|
+
|
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
|
23
|
+
Building a better future, one line of code at a time.
|
|
24
|
+
|
|
25
|
+
@contact hello@lesli.tech
|
|
26
|
+
@website https://www.lesli.tech
|
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
+
|
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// ·
|
|
31
|
+
=end
|
|
32
|
+
|
|
33
|
+
module Lesli
|
|
34
|
+
module Interfaces
|
|
35
|
+
module Application
|
|
36
|
+
module Requester
|
|
37
|
+
|
|
38
|
+
def set_path
|
|
39
|
+
@@engine_path = Lesli::Engine.routes.find_script_name({})
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Set the user language based on user_settings, session configuration or instance default locale
|
|
43
|
+
def set_locale
|
|
44
|
+
# get saved language in session, browser language or the default in config
|
|
45
|
+
# the session param is setted in settings controller through "get :language, to: "settings#language""
|
|
46
|
+
locale = session[:locale] || I18n.default_locale
|
|
47
|
+
|
|
48
|
+
# get user's preferred language
|
|
49
|
+
# IMPORTANT:
|
|
50
|
+
# Here it's not possible to use the methods provided by devise to check if user is
|
|
51
|
+
# authenticated "user_signed_in", due those methods redirects to the login controller
|
|
52
|
+
# if user is not authenticated; For some scenarios we need to have control of the behavior
|
|
53
|
+
# for not authenticated user requests, thats why here we go deeper and check if user is
|
|
54
|
+
# authenticated checking the warden storage
|
|
55
|
+
# locale = current_user.locale if warden.authenticated?
|
|
56
|
+
|
|
57
|
+
# language defined in the http header request
|
|
58
|
+
locale = request.headers["Require-Language"] unless request.headers["Require-Language"].blank?
|
|
59
|
+
|
|
60
|
+
# use default locale if requested language is not supported
|
|
61
|
+
locale = I18n.default_locale unless I18n.available_locales.include?(locale.to_sym)
|
|
62
|
+
|
|
63
|
+
# set the new locale
|
|
64
|
+
I18n.locale = locale
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Set default query params for:
|
|
68
|
+
def set_helpers_for_request
|
|
69
|
+
@query = {
|
|
70
|
+
search: params[:search] || nil,
|
|
71
|
+
pagination: {
|
|
72
|
+
perPage: (params[:perPage] ? params[:perPage].to_i : 15),
|
|
73
|
+
page: (params[:page] ? params[:page].to_i : 1)
|
|
74
|
+
},
|
|
75
|
+
order: {
|
|
76
|
+
by: (params[:orderBy] || "id"),
|
|
77
|
+
dir: (params[:order] || "desc")
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
+
|
|
20
|
+
Lesli · Your Smart Business Assistant.
|
|
21
|
+
|
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
|
23
|
+
Building a better future, one line of code at a time.
|
|
24
|
+
|
|
25
|
+
@contact hello@lesli.tech
|
|
26
|
+
@website https://lesli.tech
|
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
+
|
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// ·
|
|
31
|
+
=end
|
|
32
|
+
|
|
33
|
+
module Lesli
|
|
34
|
+
module Interfaces
|
|
35
|
+
module Application
|
|
36
|
+
module Responder
|
|
37
|
+
# Return an standard http 200 respond
|
|
38
|
+
def respond_with_successful(payload = nil)
|
|
39
|
+
# Response for modern Lesli 3 apps
|
|
40
|
+
respond_with_http(200, payload)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Usage example
|
|
44
|
+
# tasks = Task
|
|
45
|
+
# .joins(:detail)
|
|
46
|
+
# .page(query[:pagination][:page])
|
|
47
|
+
# .per(query[:pagination][:perPage])
|
|
48
|
+
#
|
|
49
|
+
# respond_with_successful_pagination(tasks)
|
|
50
|
+
#
|
|
51
|
+
# IMPORTANT: It is strictly necessary to use the pagination methods
|
|
52
|
+
# to make this work properly
|
|
53
|
+
def respond_with_pagination(records, payload = nil)
|
|
54
|
+
respond_with_http(200, {
|
|
55
|
+
pagination: {
|
|
56
|
+
page: records.current_page,
|
|
57
|
+
pages: records.total_pages,
|
|
58
|
+
total: records.total_count,
|
|
59
|
+
results: records.length
|
|
60
|
+
},
|
|
61
|
+
records: payload || records
|
|
62
|
+
})
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# JSON not found response
|
|
66
|
+
def respond_with_not_found
|
|
67
|
+
# Keep compatibility with Deutsche Leibrenten
|
|
68
|
+
if defined? DeutscheLeibrenten
|
|
69
|
+
response_body = {
|
|
70
|
+
successful: false,
|
|
71
|
+
error: {
|
|
72
|
+
message: I18n.t("core.shared.messages_danger_not_found"),
|
|
73
|
+
details: []
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return render(status: 404, json: response_body.to_json)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
respond_with_http(404, {
|
|
80
|
+
message: I18n.t("core.shared.messages_danger_not_found")
|
|
81
|
+
})
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# JSON not found response
|
|
85
|
+
def respond_with_unauthorized(detail = {})
|
|
86
|
+
error_object = {}
|
|
87
|
+
|
|
88
|
+
error_object[:message] = I18n.t("core.shared.view_text_unauthorized_request")
|
|
89
|
+
error_object[:detail] = detail if Rails.env == "development"
|
|
90
|
+
|
|
91
|
+
error_object[:role] = "( #{current_user.roles.map(&:name).join(', ')} )" if (Rails.env == "development") && !current_user.blank?
|
|
92
|
+
|
|
93
|
+
respond_to do |format|
|
|
94
|
+
format.json { render status: 401, json: error_object.to_json }
|
|
95
|
+
format.html { redirect_to "/401" } if Rails.env == "production"
|
|
96
|
+
format.html { render status: 401, json: error_object.to_json }
|
|
97
|
+
# format.xlsx { redirect_to "/401" } if Rails.env == "production"
|
|
98
|
+
# format.xlsx { render status: 401, json: error_object.to_json }
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# JSON failure response due users has to perform an action
|
|
103
|
+
# example: respond_with_action({ :redirect => "telephone_confirmation" })
|
|
104
|
+
def respond_with_action(action, message = "Action Required")
|
|
105
|
+
respond_with_http(490, { :message => message, :action => action })
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# JSON failure response
|
|
109
|
+
def respond_with_error(message = "", details = [])
|
|
110
|
+
# Message should be a String
|
|
111
|
+
message = "" unless message.instance_of?(String)
|
|
112
|
+
|
|
113
|
+
# TODO:
|
|
114
|
+
# check if active error and then:
|
|
115
|
+
# message = error message to sentence
|
|
116
|
+
# details = error array of messages
|
|
117
|
+
# check another types of errors and parse respond according
|
|
118
|
+
respond_with_http(400, { :message => message, :details => details })
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Respond with an standard http message
|
|
122
|
+
def respond_with_http(status, payload)
|
|
123
|
+
unless payload.nil?
|
|
124
|
+
return render(:status => status, content_type: "application/json", json: payload.to_json)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
render(:status => status, content_type: "application/json", json: "")
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
module Lesli
|
|
2
|
+
class ProfilesController < ApplicationController
|
|
3
|
+
before_action :set_profile, only: %i[ show edit update destroy ]
|
|
4
|
+
|
|
5
|
+
# GET /profiles
|
|
6
|
+
def index
|
|
7
|
+
@profiles = Profile.all
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# GET /profiles/1
|
|
11
|
+
def show
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# GET /profiles/new
|
|
15
|
+
def new
|
|
16
|
+
@profile = Profile.new
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# GET /profiles/1/edit
|
|
20
|
+
def edit
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# POST /profiles
|
|
24
|
+
def create
|
|
25
|
+
@profile = Profile.new(profile_params)
|
|
26
|
+
|
|
27
|
+
if @profile.save
|
|
28
|
+
redirect_to @profile, notice: "Profile was successfully created."
|
|
29
|
+
else
|
|
30
|
+
render :new, status: :unprocessable_entity
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# PATCH/PUT /profiles/1
|
|
35
|
+
def update
|
|
36
|
+
if @profile.update(profile_params)
|
|
37
|
+
redirect_to @profile, notice: "Profile was successfully updated.", status: :see_other
|
|
38
|
+
else
|
|
39
|
+
render :edit, status: :unprocessable_entity
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# DELETE /profiles/1
|
|
44
|
+
def destroy
|
|
45
|
+
@profile.destroy
|
|
46
|
+
redirect_to profiles_url, notice: "Profile was successfully destroyed.", status: :see_other
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
private
|
|
50
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
51
|
+
def set_profile
|
|
52
|
+
@profile = Profile.find(params[:id])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Only allow a list of trusted parameters through.
|
|
56
|
+
def profile_params
|
|
57
|
+
params.fetch(:profile, {})
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Users::ConfirmationsController < Devise::ConfirmationsController
|
|
4
|
+
# GET /resource/confirmation/new
|
|
5
|
+
# def new
|
|
6
|
+
# super
|
|
7
|
+
# end
|
|
8
|
+
|
|
9
|
+
# POST /resource/confirmation
|
|
10
|
+
# def create
|
|
11
|
+
# super
|
|
12
|
+
# end
|
|
13
|
+
|
|
14
|
+
# GET /resource/confirmation?confirmation_token=abcdef
|
|
15
|
+
# def show
|
|
16
|
+
# super
|
|
17
|
+
# end
|
|
18
|
+
|
|
19
|
+
# protected
|
|
20
|
+
|
|
21
|
+
# The path used after resending confirmation instructions.
|
|
22
|
+
# def after_resending_confirmation_instructions_path_for(resource_name)
|
|
23
|
+
# super(resource_name)
|
|
24
|
+
# end
|
|
25
|
+
|
|
26
|
+
# The path used after confirmation.
|
|
27
|
+
# def after_confirmation_path_for(resource_name, resource)
|
|
28
|
+
# super(resource_name, resource)
|
|
29
|
+
# end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|
4
|
+
# You should configure your model like this:
|
|
5
|
+
# devise :omniauthable, omniauth_providers: [:twitter]
|
|
6
|
+
|
|
7
|
+
# You should also create an action method in this controller like this:
|
|
8
|
+
# def twitter
|
|
9
|
+
# end
|
|
10
|
+
|
|
11
|
+
# More info at:
|
|
12
|
+
# https://github.com/heartcombo/devise#omniauth
|
|
13
|
+
|
|
14
|
+
# GET|POST /resource/auth/twitter
|
|
15
|
+
# def passthru
|
|
16
|
+
# super
|
|
17
|
+
# end
|
|
18
|
+
|
|
19
|
+
# GET|POST /users/auth/twitter/callback
|
|
20
|
+
# def failure
|
|
21
|
+
# super
|
|
22
|
+
# end
|
|
23
|
+
|
|
24
|
+
# protected
|
|
25
|
+
|
|
26
|
+
# The path used when OmniAuth fails
|
|
27
|
+
# def after_omniauth_failure_path_for(scope)
|
|
28
|
+
# super(scope)
|
|
29
|
+
# end
|
|
30
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Users::PasswordsController < Devise::PasswordsController
|
|
4
|
+
# GET /resource/password/new
|
|
5
|
+
# def new
|
|
6
|
+
# super
|
|
7
|
+
# end
|
|
8
|
+
|
|
9
|
+
# POST /resource/password
|
|
10
|
+
# def create
|
|
11
|
+
# super
|
|
12
|
+
# end
|
|
13
|
+
|
|
14
|
+
# GET /resource/password/edit?reset_password_token=abcdef
|
|
15
|
+
# def edit
|
|
16
|
+
# super
|
|
17
|
+
# end
|
|
18
|
+
|
|
19
|
+
# PUT /resource/password
|
|
20
|
+
# def update
|
|
21
|
+
# super
|
|
22
|
+
# end
|
|
23
|
+
|
|
24
|
+
# protected
|
|
25
|
+
|
|
26
|
+
# def after_resetting_password_path_for(resource)
|
|
27
|
+
# super(resource)
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
# The path used after sending reset password instructions
|
|
31
|
+
# def after_sending_reset_password_instructions_path_for(resource_name)
|
|
32
|
+
# super(resource_name)
|
|
33
|
+
# end
|
|
34
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Users::RegistrationsController < Devise::RegistrationsController
|
|
4
|
+
# before_action :configure_sign_up_params, only: [:create]
|
|
5
|
+
# before_action :configure_account_update_params, only: [:update]
|
|
6
|
+
|
|
7
|
+
# GET /resource/sign_up
|
|
8
|
+
# def new
|
|
9
|
+
# super
|
|
10
|
+
# end
|
|
11
|
+
|
|
12
|
+
# POST /resource
|
|
13
|
+
# def create
|
|
14
|
+
# super
|
|
15
|
+
# end
|
|
16
|
+
|
|
17
|
+
# GET /resource/edit
|
|
18
|
+
# def edit
|
|
19
|
+
# super
|
|
20
|
+
# end
|
|
21
|
+
|
|
22
|
+
# PUT /resource
|
|
23
|
+
# def update
|
|
24
|
+
# super
|
|
25
|
+
# end
|
|
26
|
+
|
|
27
|
+
# DELETE /resource
|
|
28
|
+
# def destroy
|
|
29
|
+
# super
|
|
30
|
+
# end
|
|
31
|
+
|
|
32
|
+
# GET /resource/cancel
|
|
33
|
+
# Forces the session data which is usually expired after sign
|
|
34
|
+
# in to be expired now. This is useful if the user wants to
|
|
35
|
+
# cancel oauth signing in/up in the middle of the process,
|
|
36
|
+
# removing all OAuth session data.
|
|
37
|
+
# def cancel
|
|
38
|
+
# super
|
|
39
|
+
# end
|
|
40
|
+
|
|
41
|
+
# protected
|
|
42
|
+
|
|
43
|
+
# If you have extra params to permit, append them to the sanitizer.
|
|
44
|
+
# def configure_sign_up_params
|
|
45
|
+
# devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
|
|
46
|
+
# end
|
|
47
|
+
|
|
48
|
+
# If you have extra params to permit, append them to the sanitizer.
|
|
49
|
+
# def configure_account_update_params
|
|
50
|
+
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
|
|
51
|
+
# end
|
|
52
|
+
|
|
53
|
+
# The path used after sign up.
|
|
54
|
+
# def after_sign_up_path_for(resource)
|
|
55
|
+
# super(resource)
|
|
56
|
+
# end
|
|
57
|
+
|
|
58
|
+
# The path used after sign up for inactive accounts.
|
|
59
|
+
# def after_inactive_sign_up_path_for(resource)
|
|
60
|
+
# super(resource)
|
|
61
|
+
# end
|
|
62
|
+
end
|