Introduction¶
The core feature of this appjar is the ability of handle users. This feature is basically a typical CRUD functionality that allows the creation, visualization, updating and deletion of the users in the application.
Users Listing¶
When entering the view, the first feature shown is a listing view that displays all the available users in the system and allows to apply certain filter to make things easier when dealing with many of them. The view is divided in two areas, the first one displays some filter components to reduce the visibility of users in the grid that it is displayed below.
Filters¶
This view will display fields for filtering users by username, availability and registration link status (more information regarding this feature later).
When a filter content is filled in any of the components the Filter button will become available. When the Filter button is clicked it will filter the contents of the grid by using the supplied information, in the following manner:
- Username: When entering a text in this text field only the usernames that contains the entered text will be displayed. As an example, if the user enters "john" then the users with username "john" and "johndoe" will be shown given that they contain the string "john" in the username.
- Availability: This component is a dropdown with the values "Enabled" and "Disabled". When selecting "Enabled" the users that are currently enabled are going to be shown in the listing. When selecting "Disabled" the users that are currently disabled are the ones going to be shown.
- Registration link status: This dropdown contains the following values: "Active", "Success" and "Expired". Each user will contain a link with one of those statuses. When selecting one of them, the users whose links are in the selected status are the ones that are going to be shown.
In the filter area, at the right, there is a button with the caption "New user". When clicking this button the user creation view will be displayed.
Users grid¶
Bellow the filter area a grid containing the filtered users is displayed. This grid will show the following columns:
- Id: This column displays a numerical identification value of the user
- Username: This column displays the username of the user
- Availability: This column displays if the user is available or not (Enabled / Disabled)
- Last logged in: This column displays the date of the last time that this user entered the application
- Link status: This column shows the status of the associated registration link of this user ("-", Active, Success and Expired)
- Actions: This column shows a dropdown menu when clicked, displaying actions that can be executed on the user associated with the current row.
Actions¶
The actions that can be performed on each of the rows are the following:
- Edit user: Displays the user's edit view.
- Create password reset link: Opens the dialog for resetting the password.
- Enable/Disable user: Toggles the availability of the user.
- Delete user: Displays a confirmation dialog with information of the current user (username, current status (availability), number of assigned roles and number of groups that the user belongs to), asking to confirm the deletion process. The deletion of the user is physical (will delete the user from the database).
Password reset dialog¶
This dialog allows creating a password reset link that the user can use to reset the password, typically when the password is forgotten.
The dialog will display the username and then a component to change the amount of days after the link will expire. Bellow the component a text displays the estimated date and time when the link will expire.
After that there is a read only text field with the link with the registration link.
The view presents a cancel button, to cancel the password reset link creation and a button that will persist the link and copy it to the clipboard so it can be shared with the user so they can reset the password.
Users Creation/Edition¶
This feature allows the creation and edition of existing users in the system.
Username¶
This field is required and represent the user name in the system. The username is the field used for entering the credentials. The username can be entered when creating a new user and it can't be changed later. The username can't be repeated in the system so the appjar will validate that is not already taken.
Roles¶
This component allows the selection of roles that will be assigned to the user being created. It shows the available roles in the system in the list that's on the left, and the selected roles for the user on the right. The buttons with symbols can be used to select and deselect the roles.
Groups¶
This component allows the selection of groups that this user will belong to. It shows the available groups in the system in the list that's on the left, and the selected groups for the user on the right. The buttons with symbols can be used to select and deselect the groups.
Summary¶
This read only list shows a summary of the views of the system that can be accessed based on the assigned roles and groups. The views that are listed here are the ones that the user with the current configuration can access.
Action buttons¶
The Save button will persist the changes made in the form, but first will execute some validations, the result of the validations will be shown so the problems can be fixed before trying the save operation again.
The Cancel button will discard the changes and return to the Users Listing view.