Module: Card::Set::Type::User
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod028-follow/type/user.rb,
platypus/tmp/set/gem-defaults/mod014-account/type/user.rb
Overview
Set: All “User” cards
Defined Under Namespace
Modules: HtmlFormat
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
Class Method Summary collapse
Instance Method Summary collapse
-
#event: check_setup ⇒ Object
-
#event: setup_first_user ⇒ Object
-
#event: signin_after_setup ⇒ Object
-
#follow(follow_name, option = "*always") ⇒ Object
Methods included from Card::Set
Methods included from I18nScope
Methods included from Registrar
#extended, #finalize_load, #process_base_modules, #register_set
Methods included from Helpers
#format_module, #format_modules, #method_missing, #modules, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscored_name
Methods included from AdvancedApi
#assign_type, #attachment, #define_set_from_error, #ensure_set, #setting_opts, #stage_method
Methods included from Format
#before, #format, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Card::Set::Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
12 13 14 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 12 def email @email end |
Class Method Details
.source_location ⇒ Object
7 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type/user.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/mod/follow/set/type/user.rb"; end |
Instance Method Details
#event: check_setup ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 57 event :check_setup, before: :check_permissions, on: :create, trigger: :required do abort :failure unless Auth.needs_setup? Auth.as_bot @setup_approved = true # we need bot authority to set the initial administrator roles # this is granted and inspected here as a separate event for # flexibility and security when configuring initial setups end |
#event: setup_first_user ⇒ Object
66 67 68 69 70 71 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 66 event :setup_first_user, :finalize, on: :create, when: :setup? do subcard %i[signup_alert_email to].cardname, content: name basket[:roles_for_first_user].map(&:cardname).each do |role| subcard [role, :members].cardname, content: name end end |
#event: signin_after_setup ⇒ Object
73 74 75 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/user.rb', line 73 event :signin_after_setup, :integrate, on: :create, when: :setup? do Auth.signin id end |
#follow(follow_name, option = "*always") ⇒ Object
8 9 10 11 12 13 14 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type/user.rb', line 8 def follow follow_name, option="*always" return unless (follow_rule = Card.fetch(follow_name)&.follow_rule_card(name, new: {})) follow_rule.drop_item "*never" follow_rule.add_item option follow_rule.save! end |