Sha256: 91dab5c85c43f12a5d8a38cc280778b39bb1d59b2a65a70b308b34c3f71fc74d

Contents?: true

Size: 688 Bytes

Versions: 3

Compression:

Stored size: 688 Bytes

Contents

class Organization::Status::InPreparation < Organization::Status::Base

  def teacher_access_mode(user)
    OrganizationAccessMode::Full.new user, organization
  end

  def student_access_mode(user)
    OrganizationAccessMode::ComingSoon.new user, organization
  end

  def ex_student_access_mode(user)
    OrganizationAccessMode::Forbidden.new user, organization
  end

  def outsider_access_mode(user)
    if organization.public?
      OrganizationAccessMode::ComingSoon.new user, organization
    else
      OrganizationAccessMode::Forbidden.new user, organization
    end
  end

  def validate!(user = nil)
    raise Mumuki::Domain::UnpreparedOrganizationError unless user
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mumuki-domain-9.14.0 app/models/concerns/organization/status/in_preparation.rb
mumuki-domain-9.13.1 app/models/concerns/organization/status/in_preparation.rb
mumuki-domain-9.13.0 app/models/concerns/organization/status/in_preparation.rb