Skip to content

Commit

Permalink
Added some missing categories (US Social Security Numbers and Router …
Browse files Browse the repository at this point in the history
…logins).
  • Loading branch information
icculus committed Dec 17, 2016
1 parent 6f9542e commit eab0ca4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 1pass.lua
Expand Up @@ -26,6 +26,8 @@ local passwordTypeNameMap = {
["wallet.government.DriversLicense"] = "Drivers licenses",
["system.Tombstone"] = "Dead items",
["securenotes.SecureNote"] = "Secure notes",
["wallet.government.SsnUS"] = "Social Security Numbers",
["wallet.computer.Router"] = "Router passwords",
-- !!! FIXME: more!
}

Expand All @@ -36,7 +38,9 @@ local passwordTypeOrdering = {
"wallet.financial.BankAccountUS",
"wallet.membership.Membership",
"wallet.government.DriversLicense",
"wallet.government.SsnUS",
"securenotes.SecureNote",
"wallet.computer.Router",
-- never show "system.Tombstone",
-- !!! FIXME: more!
}
Expand Down Expand Up @@ -295,11 +299,27 @@ local function build_secret_menuitem_creditcard(menu, info, secure)
end
secret_menuitem_builders["wallet.financial.CreditCard"] = build_secret_menuitem_creditcard


local function build_secret_menuitem_securenote(menu, info, secure)
build_secret_menuitem(menu, "Notes", secure.notesPlain, true)
end
secret_menuitem_builders["securenotes.SecureNote"] = build_secret_menuitem_securenote


local function build_secret_menuitem_ssnus(menu, info, secure)
build_secret_menuitem(menu, "Name", secure.name, false)
build_secret_menuitem(menu, "SSN", secure.number, true)
end
secret_menuitem_builders["wallet.government.SsnUS"] = build_secret_menuitem_ssnus


local function build_secret_menuitem_router(menu, info, secure)
build_secret_menuitem(menu, "Name", secure.name, false)
build_secret_menuitem(menu, "Password", secure.password, true)
end
secret_menuitem_builders["wallet.computer.Router"] = build_secret_menuitem_router


local function build_secret_menuitems(info, menu)
local metadata = load_json(basedir .. "/" .. info.uuid .. ".1password")
if (metadata == nil) or (next(metadata) == nil) then -- the "next" trick tests if table is empty.
Expand Down

0 comments on commit eab0ca4

Please sign in to comment.