diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-10-20 22:18:49 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-10-20 22:18:49 +0000 |
commit | 7125fd70cebea60b4e692c33b37bd0ea71c6ffbf (patch) | |
tree | d0970cfae92c0f6f6a023bc1729c3cb5f41002ff /app/models/user.rb | |
parent | a256addaf79a6bc8edb77874145c21a312a2b8e3 (diff) | |
download | redmine-7125fd70cebea60b4e692c33b37bd0ea71c6ffbf.tar.gz redmine-7125fd70cebea60b4e692c33b37bd0ea71c6ffbf.zip |
Split multiple classes and modules that existed in the same file (#29914, #32938).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21252 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index cb0ad9e3a..681829265 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -999,54 +999,3 @@ class User < Principal end end end - -class AnonymousUser < User - validate :validate_anonymous_uniqueness, :on => :create - - self.valid_statuses = [STATUS_ANONYMOUS] - - def validate_anonymous_uniqueness - # There should be only one AnonymousUser in the database - errors.add :base, 'An anonymous user already exists.' if AnonymousUser.unscoped.exists? - end - - def available_custom_fields - [] - end - - # Overrides a few properties - def logged?; false end - def admin; false end - def name(*args); I18n.t(:label_user_anonymous) end - def mail=(*args); nil end - def mail; nil end - def time_zone; nil end - def rss_key; nil end - - def pref - UserPreference.new(:user => self) - end - - # Returns the user's bult-in role - def builtin_role - @builtin_role ||= Role.anonymous - end - - def membership(*args) - nil - end - - def member_of?(*args) - false - end - - # Anonymous user can not be destroyed - def destroy - false - end - - protected - - def instantiate_email_address - end -end |