You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The File Manager was written when XWiki didn't support nested pages, so the folder hierarchy is implemented using the (deprecated) parent field. We should refactor the code to store folders and files as nested pages inside the drive. Note that this means a file/folder won't be able to have multiple parents (which we currently implement with tags), but we gain the benefit of nested access rights.
The text was updated successfully, but these errors were encountered:
Storing folders and files as nested pages requires a big refactoring both on the back-end and on the front-end code (scripting). Unfortunately the assumption that all files and folders are on the same XWiki space is present at all levels:
JavaScript code: files and folders are identified by the page name not reference, and there is code that plays with document references on the client side, assuming that the file and folder ids are document names and not references. Moreover, since we use Angular, we have created Angular resources to represent and work with Files and Folders, and these are backed by an URL template that has path parameters (/xwiki/bin/view/:space/:page), but doesn't support array values (the space has multiple values in our case if we want to support nested pages). So we'll have to find a workaround for this, probably using a proxy/dispatcher URL that receives the file/folder reference as query string parameter and does the proper redirect.
Velocity: same as above, + there are a few HQL queries that make the same assumption. Moreover, in the initial specs of File Manager a file can have multiple parent folders, and we implemented this using tags. This will have to be dropped if we move to nested pages (or use the folder reference as tag but it's cumbersome).
Java: same as above
Moreover, this is going to be a very dangerous refactoring because we're lacking functional tests (we have unit tests but they will have to be updated with the refactoring, most probably)
The File Manager was written when XWiki didn't support nested pages, so the folder hierarchy is implemented using the (deprecated) parent field. We should refactor the code to store folders and files as nested pages inside the drive. Note that this means a file/folder won't be able to have multiple parents (which we currently implement with tags), but we gain the benefit of nested access rights.
The text was updated successfully, but these errors were encountered: