Open
Description
Currently 401 errors leave some clues, but can still be difficult to understand. A better way to describe the situation that we might want to see here one day, would look sort of like this:
┌───────────────────────────┬───────────────────────────────┬────────────────┬───────────────┐
│ b2_copy_part call │ required value │ your key │ condition met │
├───────────────────────────┼───────────────────────────────┼────────────────┼───────────────┤
│ writeFiles permission │ yes │ yes │ YES │
│ readFiles permission │ yes │ yes │ YES │
│ target bucket restriction │ none or MyBucket │ MyBucket │ YES │
│ target prefix restriction │ matching "mydirectory/myfile" │ "mydirectory/" │ YES │
│ source bucket restriction │ none or MyOtherBucket │ MyBucket │ **NO** │
│ target prefix restriction │ matching "mydirectory/myfile" │ "mydirectory/" │ YES │
└───────────────────────────┴───────────────────────────────┴────────────────┴───────────────┘
We'd have to know which call triggered the problem, we already have properties of the key, now an api call and permissions it may require should be added to 401 and then turned into a nice report in the CLI.