Skip to content

Commit 52a1f73

Browse files
tobicevdusek
andauthored
feat: add ActorPermissionLevel enum (#51)
This enum is required for the Python client so that it supports the new `forcePermissionLevel` run option. Full context here: apify/apify-core#22681 --------- Co-authored-by: Vlada Dusek <[email protected]>
1 parent cb7db04 commit 52a1f73

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/apify_shared/consts.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,30 @@ 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_PERMISSIONS = 'FULL_PERMISSIONS'
392+
"""Full permission Actors have access to all user data in the account."""
393+
394+
LIMITED_PERMISSIONS = 'LIMITED_PERMISSIONS'
395+
"""Limited permission Actors have access only to specific resources:
396+
- default storages
397+
- storages provided via input
398+
- the current run
399+
- ...
400+
401+
Broadly speaking, limited permission Actors cannot access any account data not related to the current run.
402+
For details refer to the Apify documentation.
403+
"""
404+
405+
382406
INTEGER_ENV_VARS_TYPE = Literal[
383407
# Actor env vars
384408
ActorEnvVars.MAX_PAID_DATASET_ITEMS,

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)