]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
talk: Show SIP password to the user
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2015 13:13:03 +0000 (14:13 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2015 13:13:03 +0000 (14:13 +0100)
templates/talk/phonebook-contact.html
webapp/backend/accounts.py

index cc7e047c7e858ea94c2167b015bea4851db0ec66..7318e3c673b09f7e7f119bef031d9fd7c933a02f 100644 (file)
                                                                <a href="sip:{{ account.sip_url }}">{{ account.sip_url }}</a>
                                                        </small>
                                                </li>
+
+                                               {% if current_user == account or current_user.is_admin() %}
+                                                       <li>
+                                                               <small>
+                                                                       {{ _("Password") }}: {{ account.sip_password }}
+                                                               </small>
+                                                       </li>
+                                               {% end %}
                                        </ul>
                                {% end %}
 
index e3b70f551cb032b959282e7e738563ede04da508..e52b1899f99ffcdf61199376758cb681486d2d41 100644 (file)
@@ -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