users: remove as_admin and as_current methods.
This commit is contained in:
@@ -24,15 +24,6 @@ class CurrentUser
|
||||
scoped(user, &block)
|
||||
end
|
||||
|
||||
def self.as_admin(&block)
|
||||
if block_given?
|
||||
scoped(::User.admins.first, "127.0.0.1", &block)
|
||||
else
|
||||
self.user = ::User.admins.first
|
||||
self.ip_addr = "127.0.0.1"
|
||||
end
|
||||
end
|
||||
|
||||
def self.as_system(&block)
|
||||
if block_given?
|
||||
scoped(::User.system, "127.0.0.1", &block)
|
||||
|
||||
Reference in New Issue
Block a user