From: Michael Tremer Date: Tue, 17 Mar 2015 13:13:03 +0000 (+0100) Subject: talk: Show SIP password to the user X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f51147ad78739e72df3f6a6341a2bd5c3f77070;p=ipfire.org.git talk: Show SIP password to the user --- diff --git a/templates/talk/phonebook-contact.html b/templates/talk/phonebook-contact.html index cc7e047c..7318e3c6 100644 --- a/templates/talk/phonebook-contact.html +++ b/templates/talk/phonebook-contact.html @@ -37,6 +37,14 @@ {{ account.sip_url }} + + {% if current_user == account or current_user.is_admin() %} +
  • + + {{ _("Password") }}: {{ account.sip_password }} + +
  • + {% end %} {% end %} diff --git a/webapp/backend/accounts.py b/webapp/backend/accounts.py index e3b70f55..e52b1899 100644 --- a/webapp/backend/accounts.py +++ b/webapp/backend/accounts.py @@ -249,6 +249,10 @@ class Account(Object): if "sipRoutingObject" in self.classes: return self._get_first_attribute("sipLocalAddress") + @property + def sip_password(self): + return self._get_first_attribute("sipPassword") + @property def sip_url(self): return "%s@ipfire.org" % self.sip_id