improves recipients' details
This commit is contained in:
parent
85fcef1ec7
commit
7b354dcb22
2 changed files with 14 additions and 3 deletions
1
README
1
README
|
@ -7,5 +7,6 @@ ordinateur) et le serveur.
|
|||
$ git clone git://git.crans.org/git/cranspasswords.git
|
||||
* Copier clientconfig.example.py en clientconfig.py et adapter
|
||||
à vos besoins
|
||||
* Si ce n'est déjà fait, indiquer votre clé publique sur gest_crans
|
||||
* ???
|
||||
|
||||
|
|
|
@ -182,8 +182,18 @@ def get_recipients_of_roles(roles):
|
|||
return recipients
|
||||
|
||||
def get_dest_of_roles(roles):
|
||||
""" Summarize recipients of a role """
|
||||
allkeys = all_keys()
|
||||
return ["%s (%s -> %s)" % (rec, allkeys[rec][0], allkeys[rec][1]) for rec in \
|
||||
def additionnal_info(rec):
|
||||
""" Gives additionnal information for a given recipient """
|
||||
if len(allkeys[rec]) == 0:
|
||||
return ""
|
||||
out = allkeys[rec][0]
|
||||
if len(allkeys[rec]) > 1:
|
||||
out += " -> " + allkeys[rec][1]
|
||||
return "(%s)" % out
|
||||
|
||||
return ["%s %s" % (rec, additionnal_info(rec)) for rec in \
|
||||
get_recipients_of_roles(roles) ]
|
||||
|
||||
def encrypt(roles, contents):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue