Audit logging improved. References users, screenshots, packages
This commit is contained in:
parent
b6dee6b93c
commit
2fef9c7043
12 changed files with 95 additions and 45 deletions
|
|
@ -1,5 +1,5 @@
|
|||
class User < ApplicationRecord
|
||||
has_many :screenshots, :inverse_of=>:user
|
||||
has_many :screenshots, inverse_of: :user
|
||||
|
||||
# Include default devise modules. Others available are:
|
||||
# :confirmable, :lockable, :timeoutable and :omniauthable
|
||||
|
|
@ -78,7 +78,14 @@ class User < ApplicationRecord
|
|||
password: generated_password,
|
||||
pseudo: true
|
||||
)
|
||||
Log.log "New pseudo user for anonymous upload created: #{new_user}"
|
||||
return new_user
|
||||
end
|
||||
|
||||
def to_s
|
||||
if self.pseudo
|
||||
"Pseudo user"
|
||||
else
|
||||
"#{self.email} (#{self.provider})"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue