1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 01:10:28 +00:00
TiddlyWiki5/plugins/tiddlywiki/multiwikiserver/templates/add-user-form.tid
webplusai 6a7612ddf8
MWS authentication (#8596)
* mws authentication

* add more tests and permission checkers

* add logic to ensure that only authenticated users' requests are handled

* add custom login page

* Implement user authentication as well as session handling

* work on user operations authorization

* add middleware to route handlers for bags & tiddlers routes

* add feature that only returns the tiddlers and bags which the user has permission to access on index page

* refactor auth routes & added user management page

* fix Ci Test failure issue

* fix users list page, add manage roles page

* add commands and scripts to create new user & assign roles and permissions

* resolved ci-test failure

* add ACL permissions to bags & tiddlers on creation

* fix comments and access control list bug

* fix indentation issues

* working on user profile edit

* remove list users command & added support for database in server options

* implement user profile update and password change feature

* update plugin readme

* implement command which triggers protected mode on the server

* revert server-wide auth flag. Implement selective authorization

* ACL management feature

* Complete Access control list implementation

* Added support to manage users' assigned role by admin

* fix comments

* fix comment
2024-10-30 17:59:44 +00:00

94 lines
1.9 KiB
Plaintext

title: $:/plugins/tiddlywiki/multiwikiserver/templates/add-user-form
<h1>Add New User</h1>
<form method="POST" action="/admin/post-user">
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" class="form-input" required>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" class="form-input" required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" class="form-input" required>
</div>
<div class="form-group">
<label for="confirmPassword">Confirm Password:</label>
<input type="password" id="confirmPassword" name="confirmPassword" class="form-input" required>
</div>
<div class="form-actions">
<$button class="btn btn-primary">
Add User
<<add-user-actions>>
<$action-sendmessage $message="tm-close-tiddler"/>
</$button>
</div>
</form>
<style>
.add-user-form {
background-color: #f8f9fa;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.add-user-form h1 {
margin-top: 0;
margin-bottom: 20px;
color: #333;
font-size: 1.5em;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
.form-input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.form-actions {
margin-top: 20px;
display: flex;
gap: 1rem;
flex-direction: row;
justify-content: center;
align-items: center;
}
.btn {
width: 100%;
margin: auto;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.3s ease;
}
.btn-primary {
background-color: #007bff;
color: white;
}
.btn-primary:hover {
background-color: #0056b3;
}
</style>