dmails: allow site owner to read all mails.
Allow site owner to read dmails sent to other users. This is make it easier to investigate spam without having to drop into the dev console.
This commit is contained in:
@@ -16,6 +16,7 @@ class DmailPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def show?
|
||||
return true if user.is_owner?
|
||||
user.is_member? && (record.owner_id == user.id || record.valid_key?(request.params[:key]))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user