uploader-plus icon indicating copy to clipboard operation
uploader-plus copied to clipboard

Error when the user attempts to upload a document into a folder it has permission, but doesn'n in the folder's parents

Open douglascrp opened this issue 8 years ago • 2 comments

When an user is given the permission to write into a single folder inside of folder structure, but without permission into the higher levels in the structure, the allowed-content-types webscript fails in the line below https://github.com/softwareloop/uploader-plus/blob/master/repo/src/main/amp/config/alfresco/templates/webscripts/com/softwareloop/uploader-plus/allowed-content-types.get.js#L40

The problem is that the code is trying to access the hasAspect function in a node where the user has no permission.

douglascrp avatar Mar 02 '17 20:03 douglascrp

@douglascrp IMHO the required behavior is to fail to load the config if it is part of a folder the current user does not have any permission over. So, I would suggest to switch from JS implementation to Java implementation, run the code to resolve parents as system (probably use lower level services to avoid unecessary auditing), and discard (ignore) any setting on a node the fully authenticated user does not have permissions over and continue resolving parents

yregaieg avatar Mar 26 '17 21:03 yregaieg

@yregaieg That is exactly what I thought, but I could not find the time to work on this.

douglascrp avatar Mar 27 '17 18:03 douglascrp