API: Change required permissions for searching files and folders

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2022-10-27 15:26:56 +02:00
parent ad73819140
commit 52af69ae21

View file

@ -45,7 +45,7 @@ func SearchFoldersImport(router *gin.RouterGroup) {
// SearchFolders is a reusable request handler for directory listings (GET /api/v1/folders/*).
func SearchFolders(router *gin.RouterGroup, urlPath, rootName, rootPath string) {
handler := func(c *gin.Context) {
s := Auth(c, acl.ResourceFolders, acl.ActionSearch)
s := Auth(c, acl.ResourceFiles, acl.ActionSearch)
// Abort if permission was not granted.
if s.Abort(c) {