diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-08 21:49:30 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-08 21:49:30 -0700 |
commit | 0014745d4ad0c5e95e4ebced95062a6272359bf5 (patch) | |
tree | ee6183982710b3af96beb5f7413c435f0ddf277c /modules/rest/views | |
parent | 639d31a2c1a54f31ad32208b8602a8922d336fa0 (diff) |
Add a button to the user profile page to let you reset your REST API
key. This is useful if you think it's been compromised in some way.
Fixes ticket #1226.
Diffstat (limited to 'modules/rest/views')
-rw-r--r-- | modules/rest/views/reset_api_key_confirm.html.php | 7 | ||||
-rw-r--r-- | modules/rest/views/user_profile_rest.html.php | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/rest/views/reset_api_key_confirm.html.php b/modules/rest/views/reset_api_key_confirm.html.php new file mode 100644 index 00000000..3aae2a9a --- /dev/null +++ b/modules/rest/views/reset_api_key_confirm.html.php @@ -0,0 +1,7 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<div id="g-rest-reset-api-key" class="ui-helper-clearfix"> + <p> + <?= t("Do you really want to reset your REST API key? Any clients that use this key will need to be updated with the new value.") ?> + </p> + <?= $form ?> +</div> diff --git a/modules/rest/views/user_profile_rest.html.php b/modules/rest/views/user_profile_rest.html.php index e81f3d0b..3e5d3dbf 100644 --- a/modules/rest/views/user_profile_rest.html.php +++ b/modules/rest/views/user_profile_rest.html.php @@ -4,6 +4,9 @@ <li id="g-rest-key"> <p> <?= t("<b>Key</b>: %key", array("key" => $rest_key)) ?> + <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("rest/reset_api_key_confirm") ?>"> + <?= t("reset") ?> + </a> </p> </li> </ul> |