mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
14 lines
340 B
Ruby
14 lines
340 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
class Role < ApplicationRecord
|
|
has_and_belongs_to_many :users, join_table: 'spree_roles_users',
|
|
class_name: "Spree::User"
|
|
|
|
# The only role we have at the moment:
|
|
def self.admin
|
|
Spree::Role.find_or_create_by(name: 'admin')
|
|
end
|
|
end
|
|
end
|