mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-22 08:28:35 +00:00
20 lines
333 B
Ruby
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
|