Skip to main content
17-Peridot
April 12, 2023
Solved

Basic File upload permissions

  • April 12, 2023
  • 1 reply
  • 2395 views

Hello,

 

I was curious to know what the minimum viable permissions is for the file upload widget.

I found this post on the forum that is close to what I am looking for but not quite.

 

My error message just says:

jensc_0-1681311763005.png

I have given my user visibility to the file repository the widget uses and when I also gave the user ServiceInvoke to all services it works fine.

 

So basically what I'd like to know is which service is used when uploading?

There doesn't seem to be an obvious one as far as I can tell.

 

Thanks,

Jens

Best answer by nmutter

I tested and first got unauthorized like you. In ApplicationLog I saw

Not authorized for ServiceInvoke on SearchThingsByTemplate in SearchFunctions
Invalid Request Exception: Not authorized for ServiceInvoke on CreateFolder in TestRepo

I added these permission and the upload worked.

 

I am currently confused why this is working with only 'CreateFolder' permission in the FileRepository. Would be interesting if this works for you as well. My setup is not a clean instance, so I may have other permissions inherited or so - but could not find any. 

 

The permissions I mentioned before may have been for the older file upload widget.

1 reply

16-Pearl
April 16, 2023

I think it was these:

  • GetFileListing
  • CreateBinaryFile
    • need to give via service call - service is not visibly in composer

I did not verify it now. Maybe also

  • GetFileChecksum
  • WriteToBinaryFile 
jensc17-PeridotAuthor
17-Peridot
April 17, 2023

Hello @nmutter,

 

I tried these permissions and it seems like it was not the once needed as I am still getting the "Unauthorized" error.

Guess I'll wait and see if someone else has the answer.

 

Thanks,

Jens

nmutter16-PearlAnswer
16-Pearl
April 17, 2023

I tested and first got unauthorized like you. In ApplicationLog I saw

Not authorized for ServiceInvoke on SearchThingsByTemplate in SearchFunctions
Invalid Request Exception: Not authorized for ServiceInvoke on CreateFolder in TestRepo

I added these permission and the upload worked.

 

I am currently confused why this is working with only 'CreateFolder' permission in the FileRepository. Would be interesting if this works for you as well. My setup is not a clean instance, so I may have other permissions inherited or so - but could not find any. 

 

The permissions I mentioned before may have been for the older file upload widget.