Skip to content

Commit 7768666

Browse files
committed
feat: add ActorPermissionLevel enum
1 parent cb7db04 commit 7768666

File tree

2 files changed

+274
-251
lines changed

2 files changed

+274
-251
lines changed

src/apify_shared/consts.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,29 @@ class RunGeneralAccess(str, Enum):
379379
"""Run details and outputs are publicly visible but cannot be modified by others."""
380380

381381

382+
class ActorPermissionLevel(str, Enum):
383+
"""Determines permissions that the Actor is granted when running.
384+
385+
Based on this value, the Apify platform generates a scoped run token with a corresponding permission scope and
386+
injects it into the Actor runtime.
387+
388+
Warning: Make sure you know what you are doing when changing this value!
389+
"""
390+
391+
#: Full permission Actors have access to all user data in the account.
392+
FULL_PERMISSIONS = 'FULL_PERMISSIONS'
393+
394+
#: Limited permission Actors have access only to specific resources:
395+
#: - default storages
396+
#: - storages provided via input
397+
#: - the current run
398+
#: - ...
399+
#:
400+
#: Broadly speaking, limited permission Actors cannot access any account data not related to the current run.
401+
#: For details refer to the Apify documentation.
402+
LIMITED_PERMISSIONS = 'LIMITED_PERMISSIONS'
403+
404+
382405
INTEGER_ENV_VARS_TYPE = Literal[
383406
# Actor env vars
384407
ActorEnvVars.MAX_PAID_DATASET_ITEMS,

0 commit comments

Comments
 (0)