🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • function validate_azure_token

    Validates an Azure AD token by decoding the JWT id_token and extracting user information such as email, name, and object ID.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py | Lines: 196-269

    azure authentication jwt token-validation oauth2
  • function validate_azure_token_v1

    Validates an Azure AD token by parsing the JWT id_token and extracting user information such as user ID, email, name, and preferred username.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py | Lines: 168-231

    azure authentication jwt token-validation oauth
  • function setup_azure_sso

    Initializes and configures an Azure SSO (Single Sign-On) instance by retrieving credentials from environment variables or settings, with fallback to MS365 configuration values.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py | Lines: 127-194

    authentication azure sso oauth2 active-directory
  • function setup_azure_sso_v1

    Initializes and configures an Azure SSO (Single Sign-On) instance by loading credentials and settings from a configuration module.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py | Lines: 121-166

    azure sso authentication oauth azure-ad
  • class AzureSSO_v2

    A class that handles Azure Active Directory (Azure AD) Single Sign-On (SSO) authentication using OAuth 2.0 authorization code flow.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py | Lines: 18-125

    authentication azure azure-ad sso oauth2
  • function user_has_permission_for_resource

    Checks if a user has a specific permission for a resource, considering both general permissions and resource-specific ownership/creator rights.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py | Lines: 176-221

    authorization permissions access-control security resource-ownership
  • function check_document_permission

    Validates whether a user has specific permission(s) to access or modify a document based on their roles, ownership status, and configured role permissions.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py | Lines: 103-174

    authorization permissions RBAC access-control document-management
  • function get_user_permissions

    Retrieves all permissions for a user by aggregating permissions from their assigned roles, with fallback to default USER role permissions.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py | Lines: 71-101

    authorization permissions rbac role-based-access-control security
  • function user_has_permission

    Validates whether a user has one or more specified permissions based on their assigned roles and a role-permission mapping configuration.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py | Lines: 16-66

    authorization permissions RBAC role-based-access-control security
  • function get_version_v1

    Returns a hardcoded version string '1.0.0' representing the configuration version.

    File: /tf/active/vicechatdev/CDocs/config/__init__.py | Lines: 64-66

    version configuration metadata utility getter
  • function get_version

    Returns a list of valid status codes that a document can transition to from its current status, using either configured transitions from settings or predefined fallback rules.

    File: /tf/active/vicechatdev/CDocs/models/document_status.py | Lines: 97-134

    workflow state-machine status-management document-lifecycle validation
  • class Permission

    A constants class that defines permission type strings for a document management and review system.

    File: /tf/active/vicechatdev/CDocs/config/permission_types.py | Lines: 9-30

    permissions constants access-control authorization rbac
  • function initialize_document_counters

    Initializes document counters in Neo4j by analyzing existing ControlledDocument nodes and creating DocumentCounter nodes with values higher than the maximum existing document numbers for each department/type combination.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 689-755

    neo4j database-initialization document-management counter-initialization graph-database
  • function migrate_audit_events

    Migrates orphaned AuditEvent nodes from CDocs nodes to an AuditTrail node in a Neo4j graph database by deleting old relationships and creating new ones.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 632-687

    neo4j database-migration graph-database audit-events data-migration
  • function get_relationship_types

    Retrieves a dictionary of relationship type constants from the RelTypes class, filtering out private attributes that start with underscore.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 510-513

    introspection reflection constants relationship-types graph-database
  • function get_node_labels

    Retrieves all non-private attributes from the NodeLabels class as a dictionary, filtering out attributes that start with underscore.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 505-508

    graph-database neo4j constants metadata node-labels
  • function initialize_approval_workflow_types

    Initializes default approval workflow types in a Neo4j database by creating or updating four predefined workflow type nodes (STANDARD, DEPARTMENT, QUALITY, REGULATORY) with their configurations.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 425-487

    neo4j database-initialization workflow approval-workflow graph-database
  • function migrate_approval_cycles

    Migrates legacy Approval nodes and their related structures to the new ApprovalCycle model in a Neo4j graph database, creating ApprovalCycle nodes and ApproverAssignment nodes while maintaining relationships with DocumentVersion nodes.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 252-345

    database-migration neo4j graph-database approval-workflow data-transformation
  • function migrate_approval_data

    Migrates legacy single-step approval records in Neo4j to a new multi-step approval model by creating ApprovalStep nodes and Approver nodes with proper relationships.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 168-249

    database-migration neo4j graph-database data-transformation approval-workflow
  • function initialize_schema

    Initializes the Neo4j database schema by creating required constraints, indexes, root nodes, audit trails, and migrating existing data structures to current schema versions.

    File: /tf/active/vicechatdev/CDocs/db/schema_manager.py | Lines: 117-165

    database neo4j schema initialization migration