ToolJet/app/models/organization_user.rb
Jibran Kalia 9883bc48e7
Feature: Archive organization users (#224)
Adds the ability to archive users on organization-level
2021-06-12 07:51:57 +05:30

20 lines
333 B
Ruby

# frozen_string_literal: true
class OrganizationUser < ApplicationRecord
belongs_to :organization
belongs_to :user
enum status: { active: "active", archived: "archived", invited: "invited" }
def admin?
role == "admin"
end
def developer?
role == "developer"
end
def viewer?
role == "viewer"
end
end