1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

Move password changing apidoc comment

This commit is contained in:
Starbeamrainbowlabs 2017-01-02 20:25:46 +00:00
parent 103889d41c
commit abfeea06a8
7 changed files with 244 additions and 32 deletions

View file

@ -419,6 +419,23 @@ define({ "api": [
"filename": "./modules/action-protect.php",
"groupTitle": "Page"
},
{
"type": "get",
"url": "?action=random",
"title": "Redirects to a random page.",
"name": "RawSource",
"group": "Page",
"permission": [
{
"name": "Anonymous",
"title": "Anybody may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/action-random.php",
"groupTitle": "Page"
},
{
"type": "get",
"url": "?action=raw&page={pageName}",
@ -607,6 +624,79 @@ define({ "api": [
"filename": "./modules/feature-search.php",
"groupTitle": "Search"
},
{
"type": "post",
"url": "?action=change-password",
"title": "Change your password",
"name": "ChangePassword",
"group": "Settings",
"permission": [
{
"name": "User",
"title": "Only users loggged in may use this call.",
"description": ""
}
],
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "current-pass",
"description": "<p>Your current password.</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "new-pass",
"description": "<p>Your new password.</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "new-pass-confirm",
"description": "<p>Your new password again, to make sure you've typed it correctly.</p>"
}
]
}
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "PasswordMismatchError",
"description": "<p>The new password fields don't match.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "./modules/feature-user-preferences.php",
"groupTitle": "Settings"
},
{
"type": "get",
"url": "?action=user-preferences",
"title": "Get a user preferences configuration page.",
"name": "UserPreferences",
"group": "Settings",
"permission": [
{
"name": "User",
"title": "Only users loggged in may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/feature-user-preferences.php",
"groupTitle": "Settings"
},
{
"type": "get",
"url": "?action=recentchanges",
@ -791,7 +881,24 @@ define({ "api": [
{
"type": "get",
"url": "?action=configure",
"title": "Change the global wiki settings",
"title": "Get a page to change the global wiki settings",
"name": "ConfigureSettings",
"group": "Utility",
"permission": [
{
"name": "Moderator",
"title": "Only users loggged with a moderator account may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/feature-guiconfig.php",
"groupTitle": "Utility"
},
{
"type": "post",
"url": "?action=configure-save",
"title": "Save changes to the global wiki settings",
"name": "ConfigureSettings",
"group": "Utility",
"permission": [

View file

@ -419,6 +419,23 @@
"filename": "./modules/action-protect.php",
"groupTitle": "Page"
},
{
"type": "get",
"url": "?action=random",
"title": "Redirects to a random page.",
"name": "RawSource",
"group": "Page",
"permission": [
{
"name": "Anonymous",
"title": "Anybody may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/action-random.php",
"groupTitle": "Page"
},
{
"type": "get",
"url": "?action=raw&page={pageName}",
@ -607,6 +624,79 @@
"filename": "./modules/feature-search.php",
"groupTitle": "Search"
},
{
"type": "post",
"url": "?action=change-password",
"title": "Change your password",
"name": "ChangePassword",
"group": "Settings",
"permission": [
{
"name": "User",
"title": "Only users loggged in may use this call.",
"description": ""
}
],
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "current-pass",
"description": "<p>Your current password.</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "new-pass",
"description": "<p>Your new password.</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "new-pass-confirm",
"description": "<p>Your new password again, to make sure you've typed it correctly.</p>"
}
]
}
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "PasswordMismatchError",
"description": "<p>The new password fields don't match.</p>"
}
]
}
},
"version": "0.0.0",
"filename": "./modules/feature-user-preferences.php",
"groupTitle": "Settings"
},
{
"type": "get",
"url": "?action=user-preferences",
"title": "Get a user preferences configuration page.",
"name": "UserPreferences",
"group": "Settings",
"permission": [
{
"name": "User",
"title": "Only users loggged in may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/feature-user-preferences.php",
"groupTitle": "Settings"
},
{
"type": "get",
"url": "?action=recentchanges",
@ -791,7 +881,24 @@
{
"type": "get",
"url": "?action=configure",
"title": "Change the global wiki settings",
"title": "Get a page to change the global wiki settings",
"name": "ConfigureSettings",
"group": "Utility",
"permission": [
{
"name": "Moderator",
"title": "Only users loggged with a moderator account may use this call.",
"description": ""
}
],
"version": "0.0.0",
"filename": "./modules/feature-guiconfig.php",
"groupTitle": "Utility"
},
{
"type": "post",
"url": "?action=configure-save",
"title": "Save changes to the global wiki settings",
"name": "ConfigureSettings",
"group": "Utility",
"permission": [

View file

@ -7,7 +7,7 @@ define({
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2016-10-19T20:01:19.373Z",
"time": "2017-01-02T20:25:29.776Z",
"url": "http://apidocjs.com",
"version": "0.16.1"
}

View file

@ -7,7 +7,7 @@
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2016-10-19T20:01:19.373Z",
"time": "2017-01-02T20:25:29.776Z",
"url": "http://apidocjs.com",
"version": "0.16.1"
}

View file

@ -3851,6 +3851,18 @@ register_module([
exit(page_renderer::render_main("User Preferences - $settings->sitename", $content));
});
/**
* @api {post} ?action=change-password Change your password
* @apiName ChangePassword
* @apiGroup Settings
* @apiPermission User
*
* @apiParam {string} current-pass Your current password.
* @apiParam {string} new-pass Your new password.
* @apiParam {string} new-pass-confirm Your new password again, to make sure you've typed it correctly.
*
* @apiError PasswordMismatchError The new password fields don't match.
*/
add_action("change-password", function() {
global $env, $settings;
@ -3874,19 +3886,6 @@ register_module([
exit(page_renderer::render_main("Password Changed Successfully", "<p>You password was changed successfully. <a href='?action=user-preferences'>Go back to the user preferences page</a>.</p>"));
});
/**
* @api {post} ?action=change-password Change your password
* @apiName ChangePassword
* @apiGroup Settings
* @apiPermission User
*
* @apiParam {string} current-pass Your current password.
* @apiParam {string} new-pass Your new password.
* @apiParam {string} new-pass-confirm Your new password again, to make sure you've typed it correctly.
*
* @apiError PasswordMismatchError The new password fields don't match.
*/
add_help_section("910-user-preferences", "User Preferences", "<p>(help text coming soon)</p>");
}
]);

View file

@ -104,7 +104,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting pople do things like change their email address and password.",
"id": "feature-user-preferences",
"lastupdate": 1482516311,
"lastupdate": 1483387687,
"optional": false
},
{
@ -230,7 +230,7 @@
"author": "Emanuil Rusev & Starbeamrainbowlabs",
"description": "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
"id": "parser-parsedown",
"lastupdate": 1482776902,
"lastupdate": 1482776954,
"optional": false
}
]

View file

@ -63,6 +63,18 @@ register_module([
exit(page_renderer::render_main("User Preferences - $settings->sitename", $content));
});
/**
* @api {post} ?action=change-password Change your password
* @apiName ChangePassword
* @apiGroup Settings
* @apiPermission User
*
* @apiParam {string} current-pass Your current password.
* @apiParam {string} new-pass Your new password.
* @apiParam {string} new-pass-confirm Your new password again, to make sure you've typed it correctly.
*
* @apiError PasswordMismatchError The new password fields don't match.
*/
add_action("change-password", function() {
global $env, $settings;
@ -86,19 +98,6 @@ register_module([
exit(page_renderer::render_main("Password Changed Successfully", "<p>You password was changed successfully. <a href='?action=user-preferences'>Go back to the user preferences page</a>.</p>"));
});
/**
* @api {post} ?action=change-password Change your password
* @apiName ChangePassword
* @apiGroup Settings
* @apiPermission User
*
* @apiParam {string} current-pass Your current password.
* @apiParam {string} new-pass Your new password.
* @apiParam {string} new-pass-confirm Your new password again, to make sure you've typed it correctly.
*
* @apiError PasswordMismatchError The new password fields don't match.
*/
add_help_section("910-user-preferences", "User Preferences", "<p>(help text coming soon)</p>");
}
]);