card 1.98.3 → 1.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/config/locales/de.yml +7 -7
- data/config/locales/en.yml +7 -7
- data/config/locales/es.yml +7 -7
- data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +3 -3
- data/db/migrate_core_cards/20160801143221_change_bootstrap_card_type_to_scss.rb +1 -1
- data/db/migrate_core_cards/20160804112510_reorganize_scripts.rb +1 -1
- data/db/migrate_core_cards/20160908154210_add_trash_card.rb +1 -1
- data/db/migrate_core_cards/20180508210903_add_json_type.rb +3 -3
- data/db/migrate_core_cards/20180712042655_head_rule.rb +1 -1
- data/db/migrate_core_cards/{20180905061536_migrate_layouts.rb → 20180905061537_migrate_layouts.rb} +12 -1
- data/db/migrate_core_cards/20190204195039_add_rule_card.rb +3 -0
- data/db/migrate_core_cards/20190320091257_upgrade_recaptcha_to_v3.rb +5 -6
- data/db/migrate_core_cards/20190417142612_reorganize_scripts_2.rb +3 -3
- data/db/migrate_core_cards/20190502130029_add_shark_and_help_desk_role.rb +4 -5
- data/db/migrate_core_cards/20190618110446_add_dropdown_divider.rb +1 -1
- data/db/migrate_core_cards/20190710090209_homepage_tweaks.rb +17 -0
- data/db/migrate_core_cards/20190820155833_update_cardtype_type_structure.rb +7 -0
- data/db/migrate_core_cards/20190822093633_move_help_text_to_code.rb +38 -0
- data/db/migrate_core_cards/20190823220018_cleanup_for_decko_1_0.rb +21 -0
- data/db/migrate_core_cards/20190826132738_add_more_guides.rb +7 -0
- data/db/migrate_core_cards/20190829093961_cardtype_grouping.rb +16 -0
- data/db/migrate_core_cards/20190829205148_remove_add_help.rb +14 -0
- data/db/migrate_core_cards/20190830131820_setting_settings_aside.rb +17 -0
- data/db/migrate_core_cards/20190902161223_add_style_media.rb +7 -0
- data/db/migrate_core_cards/20190902193208_input_type.rb +22 -0
- data/db/migrate_core_cards/20190904174403_token_upgrade.rb +14 -0
- data/db/migrate_core_cards/20190909104250_add_cardtype_input_types.rb +10 -0
- data/db/migrate_core_cards/20190918200115_ensure_description_card.rb +13 -0
- data/db/migrate_core_cards/data/cards.yml +12 -8
- data/db/migrate_core_cards/data/cards/Xaccount +22 -0
- data/db/migrate_core_cards/data/cards/Xgetting_started +5 -5
- data/db/migrate_core_cards/data/cards/{Xgetting_started-link → Xgetting_started_link} +0 -0
- data/db/migrate_core_cards/data/cards/Xmain_menu +1 -1
- data/db/migrate_core_cards/data/cards/Xstructure-Xright-Xguide +12 -0
- data/db/migrate_core_cards/data/cards/administrator-dashboard +5 -0
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xguide +24 -0
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xstructure +3 -3
- data/db/migrate_core_cards/data/cards/shark-dashboard +2 -2
- data/db/migrate_core_cards/data/mailer/password_reset_email.html +6 -3
- data/db/migrate_core_cards/data/mailer/password_reset_email.txt +1 -1
- data/db/migrate_core_cards/data/mailer/verification_email.html +5 -2
- data/db/migrate_core_cards/data/mailer/verification_email.txt +2 -1
- data/db/seed/README.md +1 -1
- data/db/seed/new/card_actions.yml +2118 -2534
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +2326 -2466
- data/db/seed/new/cards.yml +2654 -3713
- data/db/seed/new/schema_migrations_core_cards.yml +77 -39
- data/db/seed/test/fixtures/card_actions.yml +3225 -3681
- data/db/seed/test/fixtures/card_acts.yml +503 -509
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +3135 -3275
- data/db/seed/test/fixtures/cards.yml +4187 -5516
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +77 -39
- data/db/{seed/test/seed.rb → test_seed.rb} +13 -11
- data/lib/card/auth.rb +1 -0
- data/lib/card/auth/current.rb +25 -27
- data/lib/card/auth/setup.rb +13 -12
- data/lib/card/auth/token.rb +38 -0
- data/lib/card/content.rb +34 -7
- data/lib/card/content/clean.rb +2 -1
- data/lib/card/content/truncate.rb +2 -0
- data/lib/card/env/success.rb +1 -14
- data/lib/card/error.rb +1 -0
- data/lib/card/format/content.rb +2 -2
- data/lib/card/format/error.rb +1 -1
- data/lib/card/format/nest.rb +1 -1
- data/lib/card/format/nesting.rb +2 -2
- data/lib/card/format/nesting/mode.rb +15 -15
- data/lib/card/mod/loader.rb +5 -0
- data/lib/card/model/save_helper.rb +2 -0
- data/lib/card/query.rb +1 -0
- data/lib/card/query/card_query/reference_attributes.rb +4 -2
- data/lib/card/seed_consts.rb +1 -1
- data/lib/card/set/format/abstract_format.rb +3 -5
- data/lib/card/set/format/abstract_format/view_opts.rb +1 -1
- data/lib/card/set/required_field.rb +8 -3
- data/lib/card/set_pattern.rb +10 -0
- data/lib/card/view/cache/stub.rb +3 -20
- data/lib/card/view/options.rb +4 -3
- data/lib/card/view/options/voo_api.rb +1 -1
- data/lib/cardio.rb +7 -1
- data/mod/Modfile +1 -0
- data/mod/account/set/abstract/account_field.rb +15 -0
- data/mod/account/set/abstract/accounted.rb +15 -0
- data/mod/account/set/all/account.rb +0 -4
- data/mod/account/set/right/account.rb +23 -151
- data/mod/account/set/right/account/events.rb +98 -0
- data/mod/account/set/right/account/views.rb +65 -0
- data/mod/account/set/right/api_key.rb +48 -0
- data/mod/account/set/right/email.rb +2 -2
- data/mod/account/set/right/password.rb +6 -9
- data/mod/account/set/right/salt.rb +5 -1
- data/mod/account/set/right/status.rb +10 -1
- data/mod/account/set/self/signin.rb +3 -3
- data/mod/account/set/type/role.rb +4 -0
- data/mod/account/set/type/signup.rb +31 -158
- data/mod/account/{template → set}/type/signup/core.haml +0 -0
- data/mod/account/set/type/signup/views.rb +93 -0
- data/mod/account/set/type/user.rb +16 -27
- data/mod/account/set/type/user/setup_help.haml +10 -0
- data/mod/account/spec/set/all/account_spec.rb +84 -98
- data/mod/account/spec/set/right/account_spec.rb +40 -33
- data/mod/account/spec/set/self/signin_spec.rb +2 -2
- data/mod/account/spec/set/type/signup_spec.rb +40 -78
- data/mod/ace_editor/db/migrate_core_cards/{20160805112548_delete_ace_help_card.rb → 20180805112548_delete_ace_help_card.rb} +1 -1
- data/mod/admin/set/self/debugger.rb +3 -0
- data/mod/admin/set/self/trash.rb +1 -1
- data/mod/basic_formats/set/all/all_css.rb +1 -1
- data/mod/basic_formats/set/all/all_csv.rb +1 -1
- data/mod/basic_formats/set/all/base.rb +19 -60
- data/mod/basic_formats/set/self/head.rb +1 -1
- data/mod/basic_types/set/type/html.rb +7 -3
- data/mod/basic_types/set/type/json.rb +1 -1
- data/mod/basic_types/set/type/plain_text.rb +1 -1
- data/mod/{standard → basic_types}/spec/set/type/html_spec.rb +6 -6
- data/mod/basic_types/spec/set/type/plain_text_spec.rb +7 -2
- data/mod/bootstrap/db/migrate_core_cards/20170719163733_update_bootswatch_themes_to_4_beta.rb +3 -3
- data/mod/bootstrap/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +2 -2
- data/mod/bootstrap/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/db/migrate_core_cards/lib/skin.rb +1 -1
- data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +26 -18
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +18 -3
- data/mod/bootstrap/set/abstract/bootswatch_theme/html_views.rb +1 -1
- data/mod/bootstrap/set/all/bootstrap/helper.rb +9 -4
- data/mod/bootstrap/set/type/customized_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors/{editor.haml → input.haml} +0 -0
- data/mod/bootstrap/spec/set/all/bootstrap/form_spec.rb +2 -2
- data/mod/carrierwave/set/self/favicon.rb +5 -0
- data/mod/carrierwave/set/self/new_file.rb +1 -1
- data/mod/carrierwave/set/self/new_image.rb +1 -1
- data/mod/carrierwave/set/type/file.rb +1 -1
- data/mod/carrierwave/set/type/image.rb +2 -2
- data/mod/carrierwave/set/type/image/html_views.rb +0 -35
- data/mod/carrierwave/spec/set/type/image_spec.rb +1 -1
- data/mod/core/chunk/link.rb +4 -2
- data/mod/core/chunk/view_stub.rb +5 -4
- data/mod/core/set/abstract/code_file.rb +1 -1
- data/mod/core/set/all/codename.rb +2 -1
- data/mod/core/set/all/content.rb +59 -0
- data/mod/core/set/all/event_conditions.rb +17 -2
- data/mod/core/set/all/location_history.rb +1 -1
- data/mod/core/set/all/name.rb +1 -1
- data/mod/core/set/all/permissions.rb +6 -36
- data/mod/core/set/all/references.rb +9 -2
- data/mod/core/set/all/rules.rb +0 -5
- data/mod/core/set_pattern/03_type.rb +4 -0
- data/mod/core/set_pattern/07_right.rb +4 -0
- data/mod/core/set_pattern/08_type_plus_right.rb +4 -0
- data/mod/core/set_pattern/09_self.rb +4 -0
- data/mod/core/spec/chunk/link_spec.rb +6 -0
- data/mod/core/spec/chunk/nest_spec.rb +2 -2
- data/mod/core/spec/set/all/permissions_spec.rb +0 -10
- data/mod/core/spec/set/all/rules_spec.rb +6 -16
- data/mod/date/set/self/datepicker.rb +6 -0
- data/mod/date/set/type/date.rb +1 -1
- data/mod/date/spec/set/type/date_spec.rb +1 -1
- data/mod/edit/set/all/bridge/account_section.rb +16 -0
- data/mod/edit/set/all/bridge/bridge_pills.rb +47 -0
- data/mod/edit/set/all/bridge/related_section.rb +34 -0
- data/mod/edit/set/all/bridge/tab_views.rb +9 -40
- data/mod/edit/set/all/bridge/tab_visibility.rb +2 -2
- data/mod/edit/set/all/edit_content.rb +3 -3
- data/mod/edit/set/all/edit_inline.rb +15 -4
- data/mod/edit/set/all/edit_name.rb +5 -7
- data/mod/edit/set/all/edit_type.rb +25 -23
- data/mod/edit/set/all/editing.rb +5 -1
- data/mod/edit/set/all/editor.rb +28 -15
- data/mod/edit/set/all/form.rb +38 -17
- data/mod/edit/set/all/form_buttons.rb +11 -2
- data/mod/edit/set/all/formgroup.rb +5 -5
- data/mod/edit/set/all/nest_editor.rb +20 -4
- data/mod/edit/set/all/nest_editor/_help.haml +7 -0
- data/mod/edit/set/all/nest_editor/nest_editor.haml +3 -2
- data/mod/edit/set/all/new.rb +40 -23
- data/mod/edit/set/all/overlay_guide.haml +7 -0
- data/mod/edit/set/all/overlay_guide.rb +9 -0
- data/mod/edit/set/all/template_nest.rb +42 -0
- data/mod/edit/set/type/list.rb +15 -0
- data/mod/edit/set/type/plain_text.rb +13 -0
- data/mod/edit/set/type/pointer.rb +11 -0
- data/mod/edit/spec/set/all/bridge/tab_views_spec.rb +1 -1
- data/mod/email/set/all/email_html.rb +2 -2
- data/mod/email/set/all/email_text.rb +2 -2
- data/mod/follow/lib/card/follower_stash.rb +1 -1
- data/mod/follow/set/all/follow/followed_by.rb +1 -1
- data/mod/follow/set/all/notify/base_views.rb +3 -3
- data/mod/follow/set/right/following.rb +1 -1
- data/mod/follow/set/self/follow_defaults.rb +1 -1
- data/mod/follow/set/type/cardtype.rb +6 -0
- data/mod/follow/set/type_plus_right/user/follow.rb +1 -1
- data/mod/history/lib/card/act/act_renderer.rb +1 -1
- data/mod/history/lib/card/action.rb +2 -1
- data/mod/history/set/all/history_bridge.rb +0 -1
- data/mod/item/set/all/bar.rb +15 -7
- data/mod/machines/file/all_script_machine_output/file.js +38245 -69
- data/mod/machines/file/all_style_machine_output/file.css +4 -4
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko/bridge.js.coffee +4 -0
- data/mod/machines/lib/javascript/decko/card_menu.js.coffee +11 -0
- data/mod/machines/lib/javascript/decko/name_editor.js.coffee +1 -1
- data/mod/machines/lib/javascript/decko/nest_editor.js.coffee +3 -1
- data/mod/machines/lib/javascript/decko/nest_editor_name.js.coffee +29 -6
- data/mod/machines/lib/javascript/decko/overlay.js.coffee +3 -2
- data/mod/machines/lib/javascript/decko/slot.js.coffee +12 -2
- data/mod/machines/lib/stylesheets/style_cards.scss +43 -53
- data/mod/machines/lib/stylesheets/style_jquery_ui_smoothness.css +13 -13
- data/mod/machines/set/abstract/script.rb +1 -1
- data/mod/machines/set/type/css.rb +1 -1
- data/mod/media/lib/stylesheets/style_image_box.scss +79 -0
- data/mod/{utility → media}/set/abstract/media.rb +0 -0
- data/mod/{utility → media}/set/abstract/media/media_snippet.haml +0 -0
- data/mod/media/set/self/style_media.rb +6 -0
- data/mod/media/set/type/image.rb +38 -0
- data/mod/{utility → media}/spec/set/abstract/media_spec.rb +0 -0
- data/mod/navbar/set/right/enabled_roles.rb +1 -1
- data/mod/pointer/lib/javascript/script_pointer_config.js.coffee +13 -0
- data/mod/pointer/lib/javascript/script_pointer_list_editor.js.coffee +7 -2
- data/mod/pointer/set/abstract/02_pointer/html_views.rb +15 -6
- data/mod/pointer/set/abstract/02_pointer/html_views/checkbox_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_item.haml +2 -0
- data/mod/pointer/set/abstract/02_pointer/html_views/radio_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/options_api.rb +6 -13
- data/mod/pointer/set/right/{options.rb → content_options.rb} +0 -0
- data/mod/pointer/set/type/link_list.rb +23 -6
- data/mod/pointer/set/type/link_list/link_list_input.haml +24 -0
- data/mod/pointer/set/type/mirrored_list.rb +1 -1
- data/mod/pointer/spec/set/abstract/pointer/html_views_spec.rb +20 -18
- data/mod/pointer/spec/set/abstract/pointer/options_api_spec.rb +2 -1
- data/mod/pointer/spec/set/self/input_options_spec.rb +1 -1
- data/mod/rules/set/right/self.rb +3 -0
- data/mod/rules/set/rule/bar_view.rb +88 -0
- data/mod/rules/set/rule/bridge_rules_editor.rb +5 -10
- data/mod/rules/set/rule/editor.rb +40 -113
- data/mod/rules/set/rule/html_views.rb +13 -0
- data/mod/rules/set/rule/quick_editor.rb +39 -0
- data/mod/rules/set/rule/{editor → quick_editor}/quick_edit.haml +0 -0
- data/mod/rules/set/rule/{editor → quick_editor}/set_info.haml +1 -1
- data/mod/rules/set/rule/rule_form/buttons.rb +3 -1
- data/mod/rules/set/rule/rule_form/form_elements.rb +2 -2
- data/mod/rules/set/rule/rule_form/rule_set_radio.rb +3 -6
- data/mod/rules/set/rule/rule_form/set_selection.rb +3 -10
- data/mod/rules/set/rule/rules.rb +10 -1
- data/mod/rules/set/type/set.rb +37 -20
- data/mod/rules/set/type/set/html_views.rb +17 -35
- data/mod/rules/set/type/set/html_views/group_panel.haml +1 -1
- data/mod/rules/set/type/set/html_views/rule_lists.rb +42 -0
- data/mod/rules/set/type/set/html_views/template.rb +1 -32
- data/mod/rules/set/type/set/rules_filter.rb +24 -10
- data/mod/rules/set/type/set/setting_lists.rb +17 -24
- data/mod/rules/spec/set/rule/bar_view_spec.rb +15 -0
- data/mod/rules/spec/set/rule/editor_spec.rb +15 -1
- data/mod/rules/spec/set/type/set/html_views_spec.rb +0 -13
- data/mod/rules/spec/set/type/set/setting_lists_spec.rb +17 -0
- data/mod/rules/spec/set/type/set_spec.rb +3 -8
- data/mod/search/set/abstract/03_filter/form_helper.rb +9 -7
- data/mod/search/set/abstract/search/views.rb +2 -2
- data/mod/search/set/right/children.rb +4 -0
- data/mod/search/set/right/created.rb +3 -0
- data/mod/search/set/right/edited.rb +3 -0
- data/mod/search/set/right/editors.rb +3 -0
- data/mod/search/set/right/follow.rb +3 -0
- data/mod/search/set/right/linked_to_by.rb +3 -0
- data/mod/search/set/right/links_to.rb +3 -0
- data/mod/search/set/right/mates.rb +3 -0
- data/mod/search/set/right/nested_by.rb +3 -0
- data/mod/search/set/right/nests.rb +3 -0
- data/mod/search/set/right/referred_to_by.rb +3 -0
- data/mod/search/set/right/refers_to.rb +3 -0
- data/mod/search/set/self/search.rb +1 -1
- data/mod/search/set/type/search_type.rb +6 -5
- data/mod/settings/lib/card/setting.rb +17 -4
- data/mod/settings/set/abstract/permission.rb +6 -2
- data/mod/settings/set/all/supports_content_options.rb +7 -0
- data/mod/settings/set/right/content_option_view.rb +10 -0
- data/mod/settings/set/right/content_options.rb +18 -0
- data/mod/settings/set/right/default.rb +18 -2
- data/mod/settings/set/right/help.rb +2 -1
- data/mod/settings/set/right/input_type.rb +35 -0
- data/mod/settings/set/right/script.rb +6 -0
- data/mod/settings/set/right/structure.rb +7 -1
- data/mod/settings/set/right/style.rb +2 -2
- data/mod/settings/set/right/style/{editor.haml → input.haml} +0 -0
- data/mod/settings/set/self/autoname.rb +3 -1
- data/mod/settings/set/self/captcha.rb +4 -1
- data/mod/settings/set/self/content_option_view.rb +10 -0
- data/mod/settings/set/self/content_options.rb +10 -0
- data/mod/settings/set/self/create.rb +2 -1
- data/mod/settings/set/self/default.rb +1 -1
- data/mod/settings/set/self/delete.rb +2 -1
- data/mod/settings/set/self/guide.rb +1 -1
- data/mod/settings/set/self/head.rb +3 -1
- data/mod/settings/set/self/help.rb +3 -1
- data/mod/settings/set/self/input_type.rb +13 -0
- data/mod/settings/set/self/layout.rb +3 -1
- data/mod/settings/set/self/on_create.rb +2 -1
- data/mod/settings/set/self/on_delete.rb +2 -1
- data/mod/settings/set/self/on_update.rb +2 -1
- data/mod/settings/set/self/read.rb +2 -1
- data/mod/settings/set/self/structure.rb +3 -1
- data/mod/settings/set/self/style.rb +3 -1
- data/mod/settings/set/self/table_of_contents.rb +4 -1
- data/mod/settings/set/self/thanks.rb +3 -1
- data/mod/settings/set/self/update.rb +2 -1
- data/mod/settings/set/type/setting.rb +15 -37
- data/mod/settings/spec/set/right/comment_spec.rb +0 -27
- data/mod/settings/spec/set/right/create_spec.rb +1 -1
- data/mod/settings/spec/set/right/structure_spec.rb +13 -10
- data/mod/settings/spec/set/type/setting_spec.rb +1 -8
- data/mod/solid_cache/set/right/solid_cache.rb +3 -3
- data/mod/standard/set/all/comment.rb +1 -1
- data/mod/standard/set/all/error.rb +2 -2
- data/mod/standard/set/all/path.rb +7 -7
- data/mod/standard/set/all/rich_html/content.rb +41 -11
- data/mod/standard/set/all/rich_html/error.rb +14 -22
- data/mod/standard/set/all/rich_html/html_views/guide.rb +1 -1
- data/mod/standard/set/all/rich_html/html_views/help.rb +19 -7
- data/mod/standard/set/all/rich_html/html_views/info.rb +1 -1
- data/mod/standard/set/all/rich_html/menu.rb +50 -2
- data/mod/standard/set/all/rich_html/overlay.rb +23 -1
- data/mod/standard/set/all/rich_html/title.rb +3 -3
- data/mod/standard/set/right/discussion.rb +8 -2
- data/mod/standard/set/right/head.rb +4 -0
- data/mod/standard/set/right/type_plus_right.rb +4 -0
- data/mod/standard/set/self/cardtype.rb +42 -0
- data/mod/standard/set/self/sidebar.rb +5 -0
- data/mod/standard/set/type/basic.rb +1 -1
- data/mod/standard/set/type/cardtype.rb +25 -11
- data/mod/standard/set/type/number.rb +1 -1
- data/mod/standard/set/type/phrase.rb +1 -1
- data/mod/standard/set/type/toggle.rb +9 -1
- data/mod/standard/set/type/uri.rb +1 -1
- data/mod/standard/spec/set/all/error_spec.rb +1 -1
- data/mod/standard/spec/set/type/cardtype_spec.rb +4 -3
- data/mod/standard/spec/set/type/number_spec.rb +1 -1
- data/mod/standard/spec/set/type/phrase_spec.rb +1 -1
- data/mod/standard/spec/set/type/toggle_spec.rb +3 -4
- data/mod/standard/spec/set/type/uri_spec.rb +1 -1
- data/mod/tinymce_editor/set/self/tiny_mce.rb +7 -0
- metadata +116 -52
- data/db/migrate_core_cards/20190710090207_homepage_tweaks.rb +0 -12
- data/db/migrate_core_cards/data/cards/eagle-description +0 -1
- data/mod/account/set/right/token.rb +0 -55
- data/mod/account/spec/set/right/token_spec.rb +0 -23
- data/mod/bootstrap/set/abstract/bootswatch_theme/thumbnail.haml +0 -10
- data/mod/rules/set/rule/table.rb +0 -27
- data/mod/rules/set/rule/table_row.rb +0 -63
- data/mod/rules/set/type/set/html_views/nest_rules.rb +0 -14
- data/mod/rules/set/type/set/html_views/rules_bridge.rb +0 -21
- data/mod/rules/set/type/set/html_views/rules_table.haml +0 -11
- data/mod/rules/set/type/set/html_views/template/template_editor.haml +0 -6
- data/mod/rules/spec/set/rule/table_row_spec.rb +0 -9
- data/mod/rules/spec/set/rule/table_spec.rb +0 -15
- data/mod/settings/set/right/add_help.rb +0 -1
- data/mod/settings/set/self/accountable.rb +0 -3
- data/mod/settings/set/self/add_help.rb +0 -2
- data/mod/settings/set/self/input.rb +0 -3
- data/mod/settings/set/self/options.rb +0 -4
- data/mod/settings/set/self/options_label.rb +0 -4
- data/mod/settings/spec/set/right/add_help_spec.rb +0 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
include_set Abstract::AccountField
|
2
2
|
|
3
3
|
event :validate_email, :validate, on: :save do
|
4
4
|
if content? && content !~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
|
@@ -25,7 +25,7 @@ event :downcase_email, :prepare_to_validate, on: :save do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def email_required?
|
28
|
-
!
|
28
|
+
!left.system?
|
29
29
|
end
|
30
30
|
|
31
31
|
def ok_to_read
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
include_set Abstract::AccountField
|
2
2
|
|
3
3
|
def history?
|
4
4
|
false
|
@@ -13,8 +13,6 @@ event :encrypt_password, :store,
|
|
13
13
|
when: proc { !Card::Env[:no_password_encryptions] } do
|
14
14
|
# no_password_encryptions = hack for import - fix with api for ignoring events
|
15
15
|
salt = left&.salt
|
16
|
-
# HACK: fix with better ORM handling
|
17
|
-
salt = Card::Env[:salt] unless salt.present?
|
18
16
|
self.content = Auth.encrypt content, salt
|
19
17
|
|
20
18
|
# errors.add :password, 'need a valid salt'
|
@@ -22,11 +20,10 @@ event :encrypt_password, :store,
|
|
22
20
|
# not sure when that broke??
|
23
21
|
end
|
24
22
|
|
25
|
-
event :validate_password, :validate,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
23
|
+
event :validate_password, :validate, on: :save do
|
24
|
+
return if content.length > 3
|
25
|
+
|
26
|
+
errors.add :password, tr(:password_length)
|
30
27
|
end
|
31
28
|
|
32
29
|
event :validate_password_present, :prepare_to_validate, on: :update do
|
@@ -42,7 +39,7 @@ format :html do
|
|
42
39
|
render_raw
|
43
40
|
end
|
44
41
|
|
45
|
-
view :
|
42
|
+
view :input do
|
46
43
|
card.content = ""
|
47
44
|
password_field :content, class: "d0-card-content", autocomplete: autocomplete?
|
48
45
|
end
|
@@ -1,4 +1,13 @@
|
|
1
|
-
|
1
|
+
include_set Abstract::AccountField
|
2
|
+
include_set Abstract::Pointer
|
3
|
+
|
4
|
+
def input_type
|
5
|
+
:radio
|
6
|
+
end
|
7
|
+
|
8
|
+
def option_names
|
9
|
+
%w[unapproved unverified active blocked system]
|
10
|
+
end
|
2
11
|
|
3
12
|
def ok_to_update
|
4
13
|
if own_account? && !Auth.always_ok?
|
@@ -71,7 +71,7 @@ def send_reset_password_email_or_fail email
|
|
71
71
|
break errors.add :email, i18n_signin(:error_blank) if email.blank?
|
72
72
|
|
73
73
|
if (account = Auth.find_account_by_email(email))&.active?
|
74
|
-
account.
|
74
|
+
Auth.as_bot { account.send_password_reset_email }
|
75
75
|
elsif account
|
76
76
|
errors.add :account, i18n_signin(:error_not_active)
|
77
77
|
else
|
@@ -86,7 +86,7 @@ format :html do
|
|
86
86
|
with_nest_mode :edit do
|
87
87
|
card_form :update, recaptcha: :off, success: signin_success do
|
88
88
|
[
|
89
|
-
|
89
|
+
_render_content_formgroups,
|
90
90
|
_render_signin_buttons
|
91
91
|
]
|
92
92
|
end
|
@@ -110,7 +110,7 @@ format :html do
|
|
110
110
|
_render_core
|
111
111
|
end
|
112
112
|
|
113
|
-
view :
|
113
|
+
view :one_line_content do
|
114
114
|
""
|
115
115
|
end
|
116
116
|
|
@@ -1,180 +1,53 @@
|
|
1
|
-
|
2
|
-
def invitation?
|
3
|
-
return @invitation unless @invitation.nil?
|
4
|
-
@invitation = Auth.signed_in? &&
|
5
|
-
(card.fetch trait: :account, new: {}).can_approve?
|
6
|
-
# consider making account a card_accessor?
|
7
|
-
end
|
8
|
-
|
9
|
-
view :new do
|
10
|
-
voo.title = invitation? ? tr(:invite) : tr(:sign_up)
|
11
|
-
super()
|
12
|
-
end
|
13
|
-
|
14
|
-
before :name_formgroup do
|
15
|
-
voo.help = tr :first_last_help
|
16
|
-
end
|
17
|
-
|
18
|
-
view :content_formgroup do
|
19
|
-
[account_formgroups, (card.structure ? edit_slot : "")].join
|
20
|
-
end
|
21
|
-
|
22
|
-
def hidden_success override=nil
|
23
|
-
override = card.rule(:thanks) unless invitation?
|
24
|
-
super override
|
25
|
-
end
|
26
|
-
|
27
|
-
view :new_buttons do
|
28
|
-
button_formgroup do
|
29
|
-
[standard_create_button, invite_button].compact
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def invite_button
|
34
|
-
return unless invitation?
|
35
|
-
button_tag "Send Invitation", situation: "primary"
|
36
|
-
end
|
37
|
-
|
38
|
-
def account_formgroups
|
39
|
-
account = card.fetch trait: :account, new: {}
|
40
|
-
Auth.as_bot do
|
41
|
-
subformat(account)._render :content_formgroup, structure: true
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
view :core, template: :haml do
|
46
|
-
@lines = [signup_line] + account_lines
|
47
|
-
@body = process_content _render_raw
|
48
|
-
end
|
49
|
-
|
50
|
-
def signup_line
|
51
|
-
[ "<strong>#{safe_name}</strong>",
|
52
|
-
("was" unless anonymous_signup?),
|
53
|
-
"signed up on #{format_date card.created_at}"
|
54
|
-
].compact.join " "
|
55
|
-
end
|
56
|
-
|
57
|
-
def anonymous_signup?
|
58
|
-
card.creator_id == AnonymousID
|
59
|
-
end
|
60
|
-
|
61
|
-
def account_lines
|
62
|
-
if card.account
|
63
|
-
verification_lines
|
64
|
-
else
|
65
|
-
[tr(:missing_account)]
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def verification_lines
|
70
|
-
[ verification_sent_line, verification_link_line].compact
|
71
|
-
end
|
72
|
-
|
73
|
-
def verification_sent_line
|
74
|
-
account = card.account
|
75
|
-
return unless account.token.present? && account.email_card.ok?(:read)
|
76
|
-
"A verification email has been sent to #{account.email}"
|
77
|
-
end
|
78
|
-
|
79
|
-
def verification_link_line
|
80
|
-
links = verification_links
|
81
|
-
return if links.empty?
|
82
|
-
links.join " "
|
83
|
-
end
|
84
|
-
|
85
|
-
def verification_links
|
86
|
-
[approve_with_token_link, approve_without_token_link, deny_link].compact
|
87
|
-
end
|
88
|
-
|
89
|
-
def approve_with_token_link
|
90
|
-
return unless card.account.can_approve?
|
91
|
-
token_action = card.account.token.present? ? "Resend" : "Send"
|
92
|
-
link_to_card card, "#{token_action} verification email",
|
93
|
-
path: { action: :update, approve_with_token: true }
|
94
|
-
end
|
1
|
+
include_set Abstract::Accounted
|
95
2
|
|
96
|
-
|
97
|
-
return unless card.account.can_approve?
|
98
|
-
link_to_card card, "Approve without verification",
|
99
|
-
path: { action: :update, approve_without_token: true }
|
100
|
-
end
|
101
|
-
|
102
|
-
def deny_link
|
103
|
-
return unless card.ok? :delete
|
104
|
-
link_to_card card, "Deny and delete", path: { action: :delete }
|
105
|
-
end
|
106
|
-
end
|
3
|
+
require_field :account
|
107
4
|
|
108
5
|
def default_account_status
|
109
|
-
"
|
110
|
-
end
|
111
|
-
|
112
|
-
event :activate_by_token, :validate, on: :update,
|
113
|
-
when: proc { |c| c.has_token? } do
|
114
|
-
abort :failure, "no field manipulation mid-activation" if subcards.present?
|
115
|
-
# necessary because this performs actions as Wagn Bot
|
116
|
-
abort :failure, "no account associated with #{name}" unless account
|
117
|
-
|
118
|
-
if account.validate_token! @env_token
|
119
|
-
# account.token_card.used!
|
120
|
-
activate_account
|
121
|
-
Auth.signin id
|
122
|
-
Auth.as_bot # use admin permissions for rest of action
|
123
|
-
success << ""
|
124
|
-
else
|
125
|
-
resend_activation_token
|
126
|
-
abort :success
|
127
|
-
end
|
6
|
+
can_approve? ? "unverified" : "unapproved"
|
128
7
|
end
|
129
8
|
|
130
|
-
def
|
131
|
-
|
9
|
+
def can_approve?
|
10
|
+
Card.new(type_id: Card.default_accounted_type_id).ok? :create
|
132
11
|
end
|
133
12
|
|
134
|
-
|
135
|
-
# FIXME: -- sends email before account is fully activated
|
136
|
-
add_subfield :account
|
137
|
-
subfield(:account).add_subfield :status, content: "active"
|
13
|
+
def activate_accounted
|
138
14
|
self.type_id = Card.default_accounted_type_id
|
139
|
-
account.send_welcome_email
|
140
15
|
end
|
141
16
|
|
142
|
-
event :
|
143
|
-
|
144
|
-
when: proc { Env.params[:approve_with_token] } do
|
145
|
-
abort :failure, "illegal approval" unless account.can_approve?
|
146
|
-
account.reset_token
|
147
|
-
account.send_account_verification_email
|
17
|
+
event :auto_approve_with_verification, :validate, on: :create, when: :can_approve? do
|
18
|
+
request_verification
|
148
19
|
end
|
149
20
|
|
150
|
-
event :
|
151
|
-
|
152
|
-
when: proc { Env.params[:approve_without_token] } do
|
153
|
-
abort :failure, "illegal approval" unless account.can_approve?
|
154
|
-
activate_account
|
21
|
+
event :approve_with_verification, :validate, on: :update, trigger: :required do
|
22
|
+
approvable { request_verification }
|
155
23
|
end
|
156
24
|
|
157
|
-
event :
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
message = "Sorry, #{account.errors.first.last}. #{message}"
|
25
|
+
event :approve_without_verification, :validate, on: :update, trigger: :required do
|
26
|
+
# TODO: if validated here, add trigger and activate in storage phase
|
27
|
+
approvable do
|
28
|
+
activate_accounted
|
29
|
+
account_subfield.activate_account
|
163
30
|
end
|
164
|
-
success << { id: "_self", view: "message", message: message }
|
165
31
|
end
|
166
32
|
|
167
|
-
|
168
|
-
Auth.
|
33
|
+
event :act_as_current_for_integrate_stage, :integrate, on: :create do
|
34
|
+
Auth.current_id = id
|
169
35
|
end
|
170
36
|
|
171
|
-
|
172
|
-
|
173
|
-
when: proc { |c| c.signed_in_as_me_without_password? } do
|
174
|
-
Env.params[:success] = account.edit_password_success_args
|
37
|
+
def account_subfield
|
38
|
+
subfield(:account) || add_subfield(:account)
|
175
39
|
end
|
176
40
|
|
177
|
-
|
178
|
-
|
179
|
-
|
41
|
+
def request_verification
|
42
|
+
acct = account_subfield
|
43
|
+
acct.add_subfield :status, content: "unverified"
|
44
|
+
acct.trigger_event! :send_verification_email
|
45
|
+
end
|
46
|
+
|
47
|
+
def approvable
|
48
|
+
if can_approve?
|
49
|
+
yield
|
50
|
+
else
|
51
|
+
abort :failure, "illegal approval" # raise permission denied?
|
52
|
+
end
|
180
53
|
end
|
File without changes
|
@@ -0,0 +1,93 @@
|
|
1
|
+
format :html do
|
2
|
+
def invitation?
|
3
|
+
Auth.signed_in? && card.can_approve?
|
4
|
+
end
|
5
|
+
|
6
|
+
view :new do
|
7
|
+
voo.title = invitation? ? tr(:invite) : tr(:sign_up)
|
8
|
+
super()
|
9
|
+
end
|
10
|
+
|
11
|
+
view :content_formgroups do
|
12
|
+
[account_formgroups, (card.structure ? edit_slot : "")].join
|
13
|
+
end
|
14
|
+
|
15
|
+
view :new_buttons do
|
16
|
+
button_formgroup do
|
17
|
+
[standard_create_button, invite_button].compact
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def invite_button
|
22
|
+
return unless invitation?
|
23
|
+
button_tag "Send Invitation", situation: "primary"
|
24
|
+
end
|
25
|
+
|
26
|
+
view :core, template: :haml do
|
27
|
+
@lines = [signup_line] + account_lines
|
28
|
+
@body = process_content _render_raw
|
29
|
+
end
|
30
|
+
|
31
|
+
def signup_line
|
32
|
+
["<strong>#{safe_name}</strong>",
|
33
|
+
("was" if invited?),
|
34
|
+
"signed up on #{format_date card.created_at}"].compact.join " "
|
35
|
+
end
|
36
|
+
|
37
|
+
def invited?
|
38
|
+
!self_signup?
|
39
|
+
end
|
40
|
+
|
41
|
+
def self_signup?
|
42
|
+
card.creator_id == AnonymousID
|
43
|
+
end
|
44
|
+
|
45
|
+
def account_lines
|
46
|
+
if card.account
|
47
|
+
verification_lines
|
48
|
+
else
|
49
|
+
[tr(:missing_account)]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def verification_lines
|
54
|
+
[verification_sent_line, verification_link_line].compact
|
55
|
+
end
|
56
|
+
|
57
|
+
def verification_sent_line
|
58
|
+
account = card.account
|
59
|
+
return unless account.email_card.ok?(:read)
|
60
|
+
"A verification email has been sent to #{account.email}"
|
61
|
+
end
|
62
|
+
|
63
|
+
def verification_link_line
|
64
|
+
links = verification_links
|
65
|
+
return if links.empty?
|
66
|
+
links.join " "
|
67
|
+
end
|
68
|
+
|
69
|
+
def verification_links
|
70
|
+
[approve_with_token_link, approve_without_token_link, deny_link].compact
|
71
|
+
end
|
72
|
+
|
73
|
+
def approve_with_token_link
|
74
|
+
action = card.account.status == "unverified" ? "Resend" : "Send"
|
75
|
+
approval_link "#{action} verification email", :with
|
76
|
+
end
|
77
|
+
|
78
|
+
def approve_without_token_link
|
79
|
+
approval_link "Approve without verification", :without
|
80
|
+
end
|
81
|
+
|
82
|
+
def approval_link text, with_or_without
|
83
|
+
return unless card.can_approve?
|
84
|
+
link_to_card card, text,
|
85
|
+
path: { action: :update,
|
86
|
+
card: { trigger: "approve_#{with_or_without}_verification" } }
|
87
|
+
end
|
88
|
+
|
89
|
+
def deny_link
|
90
|
+
return unless card.ok? :delete
|
91
|
+
link_to_card card, "Deny and delete", path: { action: :delete }
|
92
|
+
end
|
93
|
+
end
|
@@ -1,14 +1,15 @@
|
|
1
|
-
|
2
1
|
include Basic
|
2
|
+
include_set Abstract::Accounted
|
3
3
|
|
4
4
|
attr_accessor :email
|
5
5
|
|
6
6
|
format :html do
|
7
7
|
view :setup, unknown: true, perms: ->(_fmt) { Auth.needs_setup? } do
|
8
8
|
with_nest_mode :edit do
|
9
|
-
voo.title = "
|
9
|
+
voo.title = "Your deck is ready to go!" # LOCALIZE
|
10
10
|
voo.show! :help
|
11
11
|
voo.hide! :menu
|
12
|
+
voo.help = haml :setup_help
|
12
13
|
Auth.as_bot { setup_form }
|
13
14
|
end
|
14
15
|
end
|
@@ -17,8 +18,8 @@ format :html do
|
|
17
18
|
frame_and_form :create do
|
18
19
|
[
|
19
20
|
setup_hidden_fields,
|
20
|
-
_render_name_formgroup
|
21
|
-
|
21
|
+
_render_name_formgroup,
|
22
|
+
account_formgroups,
|
22
23
|
setup_form_buttons
|
23
24
|
]
|
24
25
|
end
|
@@ -28,11 +29,6 @@ format :html do
|
|
28
29
|
button_formgroup { setup_button }
|
29
30
|
end
|
30
31
|
|
31
|
-
def account_formgroup
|
32
|
-
account = card.fetch trait: :account, new: {}
|
33
|
-
subformat(account)._render :content_formgroup, structure: true
|
34
|
-
end
|
35
|
-
|
36
32
|
def setup_button
|
37
33
|
submit_button text: "Set up", disable_with: "Setting up"
|
38
34
|
end
|
@@ -44,21 +40,13 @@ format :html do
|
|
44
40
|
"card[type_id]" => Card.default_accounted_type_id
|
45
41
|
)
|
46
42
|
end
|
43
|
+
end
|
47
44
|
|
48
|
-
|
49
|
-
|
50
|
-
if Card.config.action_mailer.perform_deliveries == false
|
51
|
-
text += <<-HTML
|
52
|
-
<br>WARNING: Email delivery is turned off.
|
53
|
-
Change settings in config/application.rb to send sign up notifications.
|
54
|
-
HTML
|
55
|
-
end
|
56
|
-
text
|
57
|
-
end
|
45
|
+
def setup?
|
46
|
+
Card::Env.params[:setup]
|
58
47
|
end
|
59
48
|
|
60
|
-
event :setup_as_bot, before: :check_permissions, on: :create,
|
61
|
-
when: proc { Card::Env.params[:setup] } do
|
49
|
+
event :setup_as_bot, before: :check_permissions, on: :create, when: :setup? do
|
62
50
|
abort :failure unless Auth.needs_setup?
|
63
51
|
Auth.as_bot
|
64
52
|
# we need bot authority to set the initial administrator roles
|
@@ -66,14 +54,15 @@ event :setup_as_bot, before: :check_permissions, on: :create,
|
|
66
54
|
# flexibility and security when configuring initial setups
|
67
55
|
end
|
68
56
|
|
69
|
-
event :setup_first_user, :prepare_to_store,
|
70
|
-
on: :create, when: proc { Card::Env.params[:setup] } do
|
57
|
+
event :setup_first_user, :prepare_to_store, on: :create, when: :setup? do
|
71
58
|
add_subcard "signup alert email+*to", content: name
|
72
|
-
add_subfield :roles,
|
73
|
-
|
59
|
+
add_subfield :roles, content: roles_for_first_user
|
60
|
+
end
|
61
|
+
|
62
|
+
def roles_for_first_user
|
63
|
+
%i[help_desk shark administrator].map(&:cardname)
|
74
64
|
end
|
75
65
|
|
76
|
-
event :signin_after_setup, :integrate,
|
77
|
-
on: :create, when: proc { Card::Env.params[:setup] } do
|
66
|
+
event :signin_after_setup, :integrate, on: :create, when: :setup? do
|
78
67
|
Auth.signin id
|
79
68
|
end
|