Index: app/models/user.rb =================================================================== --- app/models/user.rb (revision 19478) +++ app/models/user.rb (working copy) @@ -634,7 +634,7 @@ Project.unscoped do return @project_ids_by_role if @project_ids_by_role - group_class = anonymous? ? GroupAnonymous : GroupNonMember + group_class = anonymous? ? GroupAnonymous.unscoped : GroupNonMember.unscoped group_id = group_class.pluck(:id).first members = Member.joins(:project, :member_roles). @@ -970,7 +970,7 @@ def validate_anonymous_uniqueness # There should be only one AnonymousUser in the database - errors.add :base, 'An anonymous user already exists.' if AnonymousUser.exists? + errors.add :base, 'An anonymous user already exists.' if AnonymousUser.unscoped.exists? end def available_custom_fields Index: lib/redmine/acts/positioned.rb =================================================================== --- lib/redmine/acts/positioned.rb (revision 19478) +++ lib/redmine/acts/positioned.rb (working copy) @@ -66,7 +66,7 @@ h[column] = yield(column) h end - self.class.where(condition_hash) + self.class.unscoped.where(condition_hash) end def set_default_position