Skip to content

Commit 9f86bf0

Browse files
authored
feat(const): add ACTOR_PERMISSION_LEVEL (#516)
Part of the [Actor permissions project](https://www.notion.so/apify/Public-Actor-permissions-design-document-1d1f39950a228015a679f276104123cb). Adding the new enum to shared packages so that it can be referenced from the Apify client.
1 parent 884846d commit 9f86bf0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

packages/consts/src/consts.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,3 +673,30 @@ export const RUN_GENERAL_ACCESS = {
673673
} as const;
674674

675675
export type RUN_GENERAL_ACCESS = ValueOf<typeof RUN_GENERAL_ACCESS>
676+
677+
/**
678+
* Determines permissions that the Actor requires to run.
679+
*
680+
* Based on this value, the Apify platform generates a scoped run token with a corresponding permission scope and
681+
* injects it into the Actor runtime.
682+
*
683+
* Warning: Make sure you know what you are doing when changing this value, in particular for public Actors!
684+
*/
685+
export const ACTOR_PERMISSION_LEVEL = {
686+
/** Full permission Actors have access to all user data in the account. */
687+
FULL_PERMISSIONS: 'FULL_PERMISSIONS',
688+
689+
/**
690+
* Limited permission Actors have access only to specific resources:
691+
* - default storages
692+
* - storages provided via input
693+
* - the current run
694+
* - ...
695+
*
696+
* Broadly speaking, limited permission Actors cannot access any account data not related to the current run.
697+
* For details refer to the Apify documentation.
698+
*/
699+
LIMITED_PERMISSIONS: 'LIMITED_PERMISSIONS',
700+
};
701+
702+
export type ACTOR_PERMISSION_LEVEL = ValueOf<typeof ACTOR_PERMISSION_LEVEL>;

0 commit comments

Comments
 (0)