Sha256: 92de89af26036ee3e3b9c5bf2f3100133875099aeb06e0e20790934b5ed840dc

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

class Organization::Status::Enabled < Organization::Status::Base

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

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

  def ex_student_access_mode(user)
    OrganizationAccessMode::ReadOnly.new user, organization, :faqs, :profile, :discussions, exercises: :submitted
  end

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

  def validate!(_user = nil)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

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