<!-- # hard line break macro for HTML -->

# fiftyone.core.selection_context

Selection service extension points.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Functions:**

| [`register_selection_context`](#fiftyone.core.selection_context.register_selection_context)(actor_provider, ...)   | Registers request identity and write-access checks for selection APIs.   |
|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [`get_actor`](#fiftyone.core.selection_context.get_actor)()                                                        | Returns the current actor, or None for local SDK operations.             |
| [`check_access`](#fiftyone.core.selection_context.check_access)(dataset, action)                                   | Raises if the registered policy denies a selection write.                |

### fiftyone.core.selection_context.register_selection_context(actor_provider, access_checker)

Registers request identity and write-access checks for selection APIs.

The access checker receives a dataset and either `"edit"` or `"tag"`.
It must raise before a denied operation. The actor provider is evaluated
in the caller’s context, including background workers. Without a provider,
selection operations use the local SDK’s unrestricted access.

* **Returns:**
  a function that restores the previous registration

### fiftyone.core.selection_context.get_actor()

Returns the current actor, or None for local SDK operations.

### fiftyone.core.selection_context.check_access(dataset, action)

Raises if the registered policy denies a selection write.
