A feature that automatically apply a specific filter after the database is unlocked
Popular easy-to-use and secure password manager
Brought to you by:
ronys
A few Password Safe users have expressed a strong interest in a feature that would automatically apply a specific filter after the database is unlocked. Discussions and example use case for this feature appears in the following thread: https://sourceforge.net/p/passwordsafe/discussion/134801/thread/e358c2c4ca/?limit=25#fd10/1852
Perhaps this is what you're looking for (at the end of the Filtering Entries help topic):
Note:
Upon Startup, Password Safe searches for a file named autoload_filters.xml in the same directory as the pwsafe.cfg file (by default C:\Users*YourUsername*\AppData\Local\PasswordSafe). If such a file exists, then it is automatically imported and the filters it contains are ready for use. This is useful if you've a set of filters that you wish to share across several databases, without having to explicitly import them each time.
Hi Rony,
Thanks for pointing out the autoload filters feature. It's a very useful feature, but I believe it only autoloads a filter but does not apply the filter on opening the database whereas FR#912 is for a feature that auto applies a filter (e.g. the autoloaded filter or one stored in the database) on safe opening. Thanks.
Thinking about this a bit more, the simplest solution seems to be to make the application of a filter persistent. That is, if filter 'f' is applied (active) when a database is closed, then it will be applied when the database is re-opened.
To implement this, we just need to add an 'active filter' field to the database header, along with the required semantics.
Makes sense?
Hi Rony,
Brilliant! I think this simple solution would be acceptable. Thank you.
Implemented in 3.67.0 (next release). Implemented as a DB preference, rather than a header
Last edit: Rony Shapiro 2024-10-11
Hi Rony,
What do you mean by "Implemented as a DB preference"? Is there anything the user needs to do other than closing their database opened in r/w mode with a filter applied for it to be auto applied on safe open?
I tested v3.67.0pre on my database, which has a database stored filter to show the most recently used entries for the past 30 days. I use tree view. When my filter is applied the tree view shows the groups and entries in the groups that meet the filter criteria (in red). I closed my database, which was opened in R/W mode with the filter applied. When I reopen the database, tree view only shows the groups for the entries meeting the filter criteria, so I'd say the feature is not yet working as I would have expected. Thanks.
Hi Rony,
A minor update to how I tested. I had killed the Password Safe application after I closed the the database then restarted Password Safe to open the database.
Hi MrMe,
"Implemented as a DB preference" as opposed to implementing this in the DB header, which was my original thinking. From the user's point of view, there's no difference.
As to your test - can you try refreshing the view (F5) after reopening?
Hi Rony,
I see the issue now.
When I closed the database with the active filter, groups the entries are in were all expanded, which applying a filter does by default. I was expecting that on reopening the safe the applied filter would show groups expanded since that is how it was saved. What is really happening is that the groups are collapsed after opening the database. Can this be changed such that the groups are expanded like when a filter is manually applied?
Thanks for the update.
What's your setting in Manage->Options->Display "Initial Tree View"? Doe setting to "Same as when last saved" make a difference?
Aah. I see now. My settings was to set to fully collapsed. Changing it to 'Same as when last saved" addressed my issue. I'd say the feature working great.