plugins.label_schemas.permissions#
Authorization for the label-schema operators.
Built on ctx.user (an
fiftyone.operators.executor.ExecutionContextUser). FiftyOne
has no users: ctx.user is None and every check passes, so the
schema lens is a visibility preference any App user may edit. FiftyOne
Enterprise populates ctx.user with the viewerβs role and
dataset_permission on every operator execution, and these checks
gate the operators there; an ADMIN bypasses dataset-permission
thresholds.
Reads are VIEW-gated: listing/getting docs feeds the Explore schema lens and the datasetβs default-schema visibility, which must work for every viewer of the dataset. Mutations are MANAGE-gated.
Data:
Dataset permission levels, ordered. |
Functions:
|
Rank for a dataset permission (string or enum), 0 when unknown. |
|
|
|
True when the viewer's dataset permission is at least |
|
|
|
- plugins.label_schemas.permissions.PERMISSION_RANK = {'EDIT': 3, 'MANAGE': 4, 'NO_ACCESS': 0, 'TAG': 2, 'VIEW': 1}#
Dataset permission levels, ordered. Mirrors
fiftyone.internal.dataset_permissions.DatasetPermission.
- plugins.label_schemas.permissions.permission_rank(permission) int#
Rank for a dataset permission (string or enum), 0 when unknown.