User Management
Learn about how to manage users in Fluent Commerce applications
Users, Roles, and Permissions
Essential knowledgeThe Fluent platform provides a comprehensive user role management system, allowing for the assignment of diverse permissions via roles to regulate platform access and functionalities. Custom roles can be created and fine-tuned, ensuring users only have access to appropriate functionality and data. The system provides flexibility to specify the scope for a role at different context levels, such as Accounts, Retailers, and Locations.- A role can be assigned to multiple users, and a user can be assigned multiple roles.
- Permissions are granular access controls and protect every GraphQL or REST API operations. GraphQL permissions follow specific naming conventions.
- Context plays a pivotal role in access levels, allowing users to have role-based access to data for specific Accounts, Retailers, or Locations.
Accessing User and Location Context with the useAuth Hook
Essential knowledgeThis lesson explores the `useAuth` hook provided by the Component SDK, which grants access to crucial information about the currently logged-in user. We'll learn how to retrieve user details, including roles/permissions and the current location/retailer context. Specifically for location-context web apps like Fluent Store, we'll focus on using this hook to access the currently selected store's information, such as longitude and latitude coordinates, which will be essential for our map implementation.`useAuth` Hook Purpose: The useAuth hook provides a convenient way to access details about the authenticated user, including their roles, permissions, and current context.- Contextual Information: The hook provides access to the user's current location or retailer context, which is vital for location-based applications.
- Location Coordinates: For location-context apps, useAuth allows retrieval of the selected store's coordinates (longitude and latitude), enabling map integration and location-based functionality.
- Fluent Store Application: In the context of Fluent Store, this hook will be used to get the coordinates of the currently viewed store, providing the data needed to display the store's location on the map.
Users Configuration Overview
Essential knowledgeOMS Webapp's Users List page allows users to efficiently search and view existing users using a versatile filter component. The Users table provides essential user details, with a clickable Username link leading to a detailed User Details page displaying user information. The paging control at the bottom ensures easy entry management with customizable rows per page and intuitive navigation.`Type`: Understand the different types of users; ADMIN, RETAILER, API, and AGENT- User Status: Be aware of the user status options, ACTIVE and INACTIVE, which reflect the user's current accessibility.
- Filtering Users: Utilize the filter component to efficiently search for users based on various criteria like username, status, creation date, and type.
- Roles and Permissions: Assign roles to users to manage permissions within the system, ensuring each user has the appropriate level of access.
- Paging Control: Utilize the paging controls at the bottom of the Users table to navigate between pages and manage the number of entries displayed per page, with options for 10, 25, or 100 entries.
- Deprecation Notice: Be aware that certain user types such as AGENT, SUPPORT, and others have been deprecated and should not be used for new users.