blob: 001425d6a6836ef2f38debf07f93458a419987a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
class V1::SmtpCertsController < ApplicationController
before_filter :require_login
before_filter :require_email_account
# GET /cert
def show
@cert = ClientCertificate.new prefix: current_user.email_address
render text: @cert.to_s, content_type: 'text/plain'
end
protected
def require_email_account
access_denied unless service_level.provides? 'email'
end
def service_level
current_user.effective_service_level
end
end
|