Class: OrganizationAccessMode::Forbidden

Inherits:
Base
  • Object
show all
Defined in:
app/models/organization_access_mode/forbidden.rb

Direct Known Subclasses

ComingSoon, Gone

Instance Attribute Summary

Attributes inherited from Base

#organization, #user

Instance Method Summary collapse

Methods inherited from Base

#initialize, #read_only?, #resolve_discussions_here?, #restore_indicators?, #show_content_element?, #show_discussion_element?, #submit_solutions_here?, #validate_content_here!, #validate_discuss_here!

Constructor Details

This class inherits a constructor from OrganizationAccessMode::Base

Instance Method Details

#discuss_here?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/organization_access_mode/forbidden.rb', line 14

def discuss_here?
  false
end

#faqs_here?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/organization_access_mode/forbidden.rb', line 6

def faqs_here?
  false
end

#profile_here?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/organization_access_mode/forbidden.rb', line 10

def profile_here?
  false
end

#show_content?(_content) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/organization_access_mode/forbidden.rb', line 18

def show_content?(_content)
  false
end

#validate_active!Object



2
3
4
# File 'app/models/organization_access_mode/forbidden.rb', line 2

def validate_active!
  raise Mumuki::Domain::ForbiddenError if organization.private? && user.present?
end