Module: Card::Set::Right::Email
Instance Method Summary
collapse
Methods included from Card::Set
abstract_set?, all_set?, card_accessor, card_reader, card_writer, clean_empty_module_from_hash, clean_empty_modules, define_active_job, define_event_method, define_event_perform_later_method, define_on_format, ensure_set, event, extended, format, process_base_module_list, process_base_modules, register_set, register_set_format, shortname, view, write_tmp_file
#permit
Instance Method Details
#email_required? ⇒ Boolean
40
41
42
|
# File 'tmpsets/set/mod007-05_standard/right/email.rb', line 40
def email_required?
!built_in?
end
|
#is_own_account? ⇒ Boolean
52
53
54
|
# File 'tmpsets/set/mod007-05_standard/right/email.rb', line 52
def is_own_account?
cardname.parts[0].to_name.key == Auth.as_card.cardname.key
end
|
#ok_to_read ⇒ Object
44
45
46
47
48
49
50
|
# File 'tmpsets/set/mod007-05_standard/right/email.rb', line 44
def ok_to_read
if is_own_account? or Auth.always_ok?
true
else
deny_because "viewing email is restricted to administrators and account holders"
end
end
|