Yes, i’m able. The problem is only the code, that it seems to have no effect. (i am AuthenticatedUser when i create the file and the AuthenticatedUser has granted all permissions by default on file)
I assume there is a logged in user at the time when the “grantForRole” method is called. Does the “AuthenticatedUser” role or the specific logged in user have the “Permission” permission?
Upload a file using API
Open console and navigate to the file
Click the "lock" icon for the file
Switch to "Roles Permissions"
See the "Permission" column and the row for the role in question.