I'm trying to mark a file for later processing and hide the file from the user. I found the File object has a Hidden property. When I set the property to true, the file remains visable. If I log in as guest or some other non-Administrator account, the file is visable.
void Test_Execute(Object sender, CommandItemEventArgs e) { //get connection object VDF.Vault.Currency.Connections.Connection conn = e.Context.Application.Connection; IEnumerable<ISelection> Selection = e.Context.ViewSelectionSet; foreach (ISelection Selent in Selection) { if (Selent.TypeId == SelectionTypeId.File) { File MasterFile = conn.WebServiceManager.DocumentService.GetLatestFileByMasterId(Selent.Id); // check if file is locked or checked out if (!MasterFile.Locked || !MasterFile.CheckedOut) { //Hide the master file MasterFile.Hidden = true; }//end if not checked out or locked }//end if is file }//end for each file }//end void Test_Execute
Not sure why the file remains visable
Thanks,
MFZ
Solved! Go to Solution.
Solved by smithmat. Go to Solution.
There is a Vault Explorer client setting which determines whether hidden files show up for the user or not: Tools->Options->Show hidden files.:
Hidden files are not a security feature--any user can see them if they want to.
- Matt
In addition to Matt's comment, your code is not changing the file to hidden. You have to checkin the file with hidden=false (hidden is a parameter of the checkin method).
-Dave