2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
2013-06-12 15:59:58 +00:00
|
|
|
|
2012-04-16 11:57:33 +00:00
|
|
|
class Group < ApplicationModel
|
2019-01-28 06:04:05 +00:00
|
|
|
include CanBeImported
|
2017-05-02 15:21:13 +00:00
|
|
|
include HasActivityStreamLog
|
|
|
|
include ChecksClientNotification
|
2021-04-12 09:49:26 +00:00
|
|
|
include ChecksHtmlSanitized
|
2017-05-02 15:21:13 +00:00
|
|
|
include ChecksLatestChangeObserved
|
|
|
|
include HasHistory
|
2021-08-17 16:37:16 +00:00
|
|
|
include HasObjectManagerAttributes
|
2020-02-20 13:34:03 +00:00
|
|
|
include HasCollectionUpdate
|
|
|
|
include HasTicketCreateScreenImpact
|
2021-01-27 12:55:22 +00:00
|
|
|
include HasSearchIndexBackend
|
2017-01-31 17:13:45 +00:00
|
|
|
|
2019-07-04 11:16:55 +00:00
|
|
|
belongs_to :email_address, optional: true
|
|
|
|
belongs_to :signature, optional: true
|
2018-06-25 10:35:57 +00:00
|
|
|
|
2021-09-23 07:52:08 +00:00
|
|
|
# workflow checks should run after before_create and before_update callbacks
|
|
|
|
include ChecksCoreWorkflow
|
|
|
|
|
2018-06-25 10:35:57 +00:00
|
|
|
validates :name, presence: true
|
2013-09-29 16:40:42 +00:00
|
|
|
|
2021-04-12 09:49:26 +00:00
|
|
|
sanitized_html :note
|
|
|
|
|
2017-01-31 17:13:45 +00:00
|
|
|
activity_stream_permission 'admin.group'
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|