Skip to content

Commit

Permalink
Fix permissions config from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiseck3 committed Jul 3, 2024
1 parent fe11f5e commit dbb955d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions unstructured/ingest/v2/cli/cmds/sharepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ def get_cli_options() -> list[click.Option]:
https://[tenant]-admin.sharepoint.com.\
This requires the app to be registered at a tenant level",
),
click.Option(
["--permissions-application-id"],
type=str,
help="Microsoft Graph API application id",
),
click.Option(
["--permissions-client-cred"],
type=str,
help="Microsoft Graph API application credentials",
),
click.Option(
["--permissions-tenant"],
type=str,
help="e.g https://contoso.onmicrosoft.com to get permissions data within tenant.",
),
]
return options

Expand Down Expand Up @@ -71,21 +86,6 @@ def get_cli_options() -> list[click.Option]:
default=False,
help="Don't process site pages.",
),
click.Option(
["--permissions-application-id"],
type=str,
help="Microsoft Graph API application id",
),
click.Option(
["--permissions-client-cred"],
type=str,
help="Microsoft Graph API application credentials",
),
click.Option(
["--permissions-tenant"],
type=str,
help="e.g https://contoso.onmicrosoft.com to get permissions data within tenant.",
),
]
return options

Expand Down
4 changes: 2 additions & 2 deletions unstructured/ingest/v2/processes/connectors/sharepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from urllib.parse import quote

from unstructured.documents.elements import DataSourceMetadata
from unstructured.ingest.enhanced_dataclass import enhanced_field
from unstructured.ingest.enhanced_dataclass import EnhancedDataClassJsonMixin, enhanced_field
from unstructured.ingest.error import SourceConnectionNetworkError
from unstructured.ingest.v2.interfaces import (
AccessConfig,
Expand Down Expand Up @@ -61,7 +61,7 @@ class SharepointAccessConfig(AccessConfig):


@dataclass
class SharepointPermissionsConfig:
class SharepointPermissionsConfig(EnhancedDataClassJsonMixin):
permissions_application_id: str
permissions_tenant: str
permissions_client_cred: str = enhanced_field(sensitive=True)
Expand Down

0 comments on commit dbb955d

Please sign in to comment.