Skip to content

Commit

Permalink
NXDRIVE-2304: [Direct Transfer] Do not allow to upload in documents w…
Browse files Browse the repository at this point in the history
…ith the HiddenInCreation facet
  • Loading branch information
Mickaël Schoentgen authored and BoboTiG committed Sep 11, 2020
1 parent e09007a commit 9d46442
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changes/4.4.5.md
Expand Up @@ -44,6 +44,7 @@ Release date: `2020-xx-xx`
- [NXDRIVE-2268](https://jira.nuxeo.com/browse/NXDRIVE-2268): Best efforts to center a window on the screen
- [NXDRIVE-2276](https://jira.nuxeo.com/browse/NXDRIVE-2276): Introduce the notion of sessions
- [NXDRIVE-2300](https://jira.nuxeo.com/browse/NXDRIVE-2300): Update the sync counter in real-time
- [NXDRIVE-2304](https://jira.nuxeo.com/browse/NXDRIVE-2304): Do not allow to upload in documents with the `HiddenInCreation` facet

## GUI

Expand Down
5 changes: 4 additions & 1 deletion nxdrive/gui/folders_model.py
Expand Up @@ -97,7 +97,10 @@ def folderish(self) -> bool:

def enable(self) -> bool:
"""Allow to select the folder only if the user can effectively create documents inside."""
return "ReadWrite" in self.doc.contextParameters["permissions"]
return (
"HiddenInCreation" not in self.doc.facets
and "ReadWrite" in self.doc.contextParameters["permissions"]
)

def get_id(self) -> str:
"""The document's UID."""
Expand Down

0 comments on commit 9d46442

Please sign in to comment.