@@ -367,23 +367,41 @@ object WhiskAction extends DocumentFactory[WhiskAction] with WhiskEntityQueries[
367
367
368
368
// notes on users, just have 2 type users,
369
369
// 1. the action's owner
370
- // 2. the user (not the owner) who used the shared action directly(e.g. get, invoke)
370
+ // 2. the user (not the owner) who used the shared action directly(e.g. get, invoke), we call it "the shared user"
371
371
//
372
372
// Notes on permission control
373
- // 1. the action's read permission should open forever, because under invoke action or update action and so on ,
374
- // need to use `fetch` api to get the action to judge it whether exist.
375
- // 2. the user(not the owner) can't update/delete the action forever .
376
- // 3. the owner's permission can affect other user's permission, e.g
377
- // if the owner is not given execute permission, the user(not the owner) can't have execute permission as well.
373
+ // 1. the owner has read(or download) permission on any situation, but for the shared user ,
374
+ // in spite of has read permission on any situation, but can set it undownloadable or downloadable
375
+ // 2. the shared user can't update/delete the action on any situation .
376
+ // 3. the owner's permission can affect the shared user's permission, e.g
377
+ // if the owner is not given execute permission, the shared user can't have execute permission as well.
378
378
//
379
379
// Notes on permission values, include below permission value
380
- // 1. permission code:rwxr-x: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:read(yes)/write(no)/execute(yes), this is default
381
- // 2. permission code:rwxr--: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:read(yes)/write(no)/execute(no)
382
- // 3. permission code:r-xr-x: owner:read(yes)/write(no)/execute(yes)|the shared action's user:read(yes)/write(no)/execute(yes)
383
- // 4. permission code:r-xr--: owner:read(yes)/write(no)/execute(yes)|the shared action's user:read(yes)/write(no)/execute(no)
384
- // 5. permission code:r--r--: owner:read(yes)/write(no)/execute(no)|the shared action's user:read(yes)/write(no)/execute(no)
385
- // 6. permission code:rw-r--: owner:read(yes)/write(yes)/execute(no)|the shared action's user:read(yes)/write(no)/execute(no)
386
- val permissionList = List (defaultPermissions, " rwxr--" , " r-xr-x" , " r-xr--" , " r--r--" , " rw-r--" )
380
+ // 1. permission code:rwxr-x: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:download(yes)/write(no)/execute(yes), this is default
381
+ // 2. permission code:rwxr--: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:download(yes)/write(no)/execute(no)
382
+ // 3. permission code:r-xr-x: owner:read(yes)/write(no)/execute(yes)|the shared action's user:download(yes)/write(no)/execute(yes)
383
+ // 4. permission code:r-xr--: owner:read(yes)/write(no)/execute(yes)|the shared action's user:download(yes)/write(no)/execute(no)
384
+ // 5. permission code:r--r--: owner:read(yes)/write(no)/execute(no)|the shared action's user:download(yes)/write(no)/execute(no)
385
+ // 6. permission code:rw-r--: owner:read(yes)/write(yes)/execute(no)|the shared action's user:download(yes)/write(no)/execute(no)
386
+ // 7. permission code:rwx--x: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:download(no)/write(no)/execute(yes)
387
+ // 8. permission code:rwx---: owner:read(yes)/write(yes)/execute(yes)|the shared action's user:download(no)/write(no)/execute(no)
388
+ // 9. permission code:r-x--x: owner:read(yes)/write(no)/execute(yes)|the shared action's user:download(no)/write(no)/execute(yes)
389
+ // 10. permission code:r-x---: owner:read(yes)/write(no)/execute(yes)|the shared action's user:download(no)/write(no)/execute(no)
390
+ // 11. permission code:r-----: owner:read(yes)/write(no)/execute(no)|the shared action's user:download(no)/write(no)/execute(no)
391
+ // 12. permission code:rw----: owner:read(yes)/write(yes)/execute(no)|the shared action's user:download(no)/write(no)/execute(no)
392
+ val permissionList = List (
393
+ defaultPermissions,
394
+ " rwxr--" ,
395
+ " r-xr-x" ,
396
+ " r-xr--" ,
397
+ " r--r--" ,
398
+ " rw-r--" ,
399
+ " rwx--x" ,
400
+ " rwx---" ,
401
+ " r-x--x" ,
402
+ " r-x---" ,
403
+ " r-----" ,
404
+ " rw----" )
387
405
388
406
override val collectionName = " actions"
389
407
override val cacheEnabled = true
0 commit comments