Add audit log entries for user roles (#19040)
* Refactor audit log schema * Add audit log entries for user roles
This commit is contained in:
parent
99aed9069d
commit
0396acf39e
27 changed files with 151 additions and 99 deletions
|
@ -46,7 +46,7 @@ class CustomEmoji < ApplicationRecord
|
|||
scope :local, -> { where(domain: nil) }
|
||||
scope :remote, -> { where.not(domain: nil) }
|
||||
scope :alphabetic, -> { order(domain: :asc, shortcode: :asc) }
|
||||
scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches('%.' + domain))) }
|
||||
scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches("%.#{domain}"))) }
|
||||
scope :listed, -> { local.where(disabled: false).where(visible_in_picker: true) }
|
||||
|
||||
remotable_attachment :image, LIMIT
|
||||
|
@ -67,6 +67,10 @@ class CustomEmoji < ApplicationRecord
|
|||
copy.tap(&:save!)
|
||||
end
|
||||
|
||||
def to_log_human_identifier
|
||||
shortcode
|
||||
end
|
||||
|
||||
class << self
|
||||
def from_text(text, domain = nil)
|
||||
return [] if text.blank?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue