Session
Documentation for the Session object in NocoDB Scripts
The session
object provides information about the current user who is executing the script. It allows you to access contextual information about the user's identity and permissions.
Overview
The session
object is available in every NocoDB script and provides a way to:
- Access the current user's information (ID, name, email)
Properties
Property | Type | Description |
---|---|---|
currentUser | Collaborator | A Collaborator object representing the current user running the script (read-only) |
Usage Examples
Getting Current User Information
// Access the current user information
const currentUser = session.currentUser;
output.markdown('# Current User Information');
output.text(`ID: ${currentUser.id}`);
output.text(`Name: ${currentUser.name || 'No name set'}`);
output.text(`Email: ${currentUser.email}`);