Folders – system description
Tables of storage and share folders, rules for creating and editing, Drive permission endpoints, deletion and the permission keys of share folders.
Unified folder module: storage folders (registration of a physical folder) and share folders (virtual) in one merged list with document counts. Share folders have no controller of their own; this module checks their permission keys.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role |
|---|---|
folder | storage folder registration |
doc_share, doc_share_item | share folder and its documents |
doc_share_user, doc_share_to_store | assigned users, websites |
doc | counts, folders derived from documents |
Process
- List: registered and document-derived storage folders plus share folders; scope (
getAllowedCompanyIds); row buttons tied todocumentshareedit/delete,documentlist/edit/share,foldersdownload. - Creation –
shared: name required and unique,addShare(active/inactive, parent, websites), user sync;storage: client required (scope), for gdrive the company's linked account and a parent folder are required, for local an existing directory under the storage root; a second registration is refused (error_folder_exists); optional virtual share and users. Without the table:error_folder_table. - Editing:
editinfo,editfolder(on DriverenameFile/moveFile, locally directory rename; same name refused),setstatus,shareitemadd/shareitemdel(link only),docsearch(scope-filtered, max. 10),permissions/addpermission(e-mail validation, rolereader/commenter/writer)/delpermission,locallist/createlocalfolder(editor the calling screen's right). - Delete (
folder:<id>/shared:<id>): storage registration only when empty (error_folder_in_use), the physical folder stays; share folder:deleteShare, documents stay.
Permissions
- Function rights:
folderslist,add(canSave),edit,delete,debug; for share foldersdocumentshareedit(sharestatuswithdocumentshareORfoldersedit) anddelete. documentsharelistanddebugexist only in the catalogue.
Known limitations
The Drive permission endpoints, setstatus and shareitemadd/shareitemdel do not check the folder's company against the scope.