User Management
This document covers the user management system in the ShipSaaS template, including user roles, permissions, and administrative actions.
Core Features
Section titled “Core Features”The ShipSaaS template contains a user management system with the following capabilities:
- User searching and filtering
- Pagination with customizable page sizes
- Management of user roles and account statuses
- Ability to ban/unban users
User Management Interface
Section titled “User Management Interface”The user management interface is accessible via the dashboard (by default, only accessible by administrators) and lists all users in the system.
The user table includes the following features:
- Column Visibility: Toggle which columns are displayed using the columns dropdown menu.
- Search and Filter: Find users by name or email using the search bar.
- Pagination: Customizable page sizes (10, 20, 30, 40, 50).
User Roles and Permissions
Section titled “User Roles and Permissions”The ShipSaaS template supports two user roles by default: admin and user.
You can create new roles by following the instructions in the Roles | Better Auth Documentation.
You can also add permissions to roles to control what actions users can perform, following the Permissions | Better Auth Documentation.
Setting an Admin User
Section titled “Setting an Admin User”To set a user as an administrator:
- Access your database using Drizzle Studio.
- Navigate to the
usertable. - Find the user you want to make an administrator.
- Update their
rolefield toadmin. - Save the changes; the user will now have admin privileges.
Ban Management
Section titled “Ban Management”Banning a User
Section titled “Banning a User”To ban a user:
- Click on a user’s name in the user table to open their details.
- In the ban section:
- Enter a reason for the ban.
- Optionally set an expiration date.
- Click the
Ban Userbutton.
The user will be immediately banned and will no longer be able to log in.
Unbanning a User
Section titled “Unbanning a User”To unban a user:
- Click on a user’s name in the user table.
- In the user details panel, click the
Unban Userbutton.
The user’s ban will be lifted immediately.
Next Steps
Section titled “Next Steps”Now that you understand user management in the ShipSaaS template, explore these related topics:
-
Authentication - Configure user authentication
-
Website Configuration - Configure core website settings
-
Database - Configure database
-
Metadata - Configure website metadata and localization