Revision c72a830d ui/userdata/views.py
b/ui/userdata/views.py | ||
---|---|---|
32 | 32 |
if not SUPPORT_GENERATE_KEYS: |
33 | 33 |
raise Exception("Application does not support ssh keys generation") |
34 | 34 |
|
35 |
if PublicKeyPair.user_limit_exceeded(request.user): |
|
36 |
raise http.HttpResponseServerError("SSH keys limit exceeded"); |
|
37 |
|
|
38 |
|
|
35 | 39 |
# generate RSA key |
36 | 40 |
key = M2C.RSA.gen_key(SSH_KEY_LENGTH, SSH_KEY_EXPONENT, lambda x: ""); |
37 | 41 |
|
Also available in: Unified diff