Aller au contenu principal

Users Configuration

Description​

The Users Configuration defines user profiles within the Liberty Framework. Each user has settings such as their role, status, language, theme, and permissions.

Data Structure​

Field NameTypeDescription
USR_IDstringUnique user identifier.
USR_PASSWORDstringUser’s password (hashed or stored securely).
USR_NAMEstringThe full name of the user.
USR_EMAILstringThe user’s email address.
USR_STATUS"Y" | "N"Indicates if the user is active.
USR_ADMIN"Y" | "N"Defines if the user has admin privileges.
USR_LANGUAGEstringPreferred language of the user.
USR_MODE"dark" | "light"UI theme preference (dark/light mode).
USR_READONLY"Y" | "N"Determines if the user has read-only access.
USR_DASHBOARDnumber | undefinedThe dashboard assigned to the user.
USR_THEMEstringThe theme applied to the user’s UI.

Example Usage​

import { useAppContext } from "@nomana-it/liberty-core"

export const UsersExample = () => {
const { userProperties } = useAppContext();

return (
<div>
<h2>Current User</h2>
<ul>
<li><strong>Name:</strong> {userProperties.name}</li>
<li><strong>Email:</strong> {userProperties.email}</li>
<li><strong>Theme:</strong> {userProperties.theme}</li>
</ul>
</div>
);
};

🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core