Ezio Melotti added the comment:

After discussing with Brett and R. David, I modified Maciej patch to make 
GitHub usernames public.  The previous patch I uploaded has stricter 
permissions checks in case we change our mind.

_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue579>
_______________________________________________________
diff --git a/html/user.index.html b/html/user.index.html
--- a/html/user.index.html
+++ b/html/user.index.html
@@ -19,7 +19,7 @@
 <table class="form" tal:define="
        search_input templates/page/macros/search_input;">
 
-   <tr><th class="header" colspan="5">Search for users</th></tr>
+   <tr><th class="header" colspan="7">Search for users</th></tr>
    <tr>
        <th class="header">Username</th>
        <td tal:define="name string:username">
@@ -33,6 +33,12 @@
                          name name;
                          id name"/>
        </td>
+       <th class="header">GitHub</th>
+       <td tal:define="name string:github">
+           <input tal:attributes="value python:request.form.getvalue(name) or 
nothing;
+                         name name;
+                         id name"/>
+       </td>
 
        <td><input class="form-small" type="submit" value="Search" 
i18n:attributes="value"/></td>
    </tr>
@@ -46,6 +52,7 @@
        tal:define="batch request/batch">
 <tr>
  <th i18n:translate="">Username</th>
+ <th>GitHub</th>
  <th i18n:translate="">Real name</th>
  <th i18n:translate="">Organisation</th>
  <th i18n:translate="">Email address</th>
@@ -57,6 +64,7 @@
   <a tal:attributes="href string:user${user/id}"
      tal:content="user/username">username</a><tal:if 
condition="user/contrib_form"><span tal:attributes="title string:Contributor 
form received on ${user/contrib_form_date/pretty}">&nbsp;*</span></tal:if>
  </td>
+ <td tal:content="python:user.github.plain() or default">&nbsp;</td>
  <td tal:content="python:user.realname.plain() or default">&nbsp;</td>
  <td tal:content="python:user.organisation.plain() or default">&nbsp;</td>
  <td tal:content="python:user.address.email() or default">&nbsp;</td>
diff --git a/html/user.item.html b/html/user.item.html
--- a/html/user.item.html
+++ b/html/user.item.html
@@ -90,6 +90,11 @@
  </tr>
  </tal:if>
 
+ <tr tal:condition="context/github/is_view_ok" tal:define="name string:github; 
label string:GitHub Name; value context/github">
+  <th metal:use-macro="th_label">GitHub Name</th>
+  <td><input name="github" metal:use-macro="normal_input"></td>
+ </tr>
+
  <tr tal:define="name string:organisation; label string:Organisation; value 
context/organisation">
   <th metal:use-macro="th_label">Organisation</th>
   <td><input name="organisation" metal:use-macro="normal_input"></td>
diff --git a/schema.py b/schema.py
--- a/schema.py
+++ b/schema.py
@@ -97,6 +97,7 @@
              openids=String(), # space separated list
              iscommitter=Boolean(),
              homepage=String(),
+             github=String(),
              )
 user.setkey("username")
 db.security.addPermission(name='Register', klass='user',
@@ -349,7 +350,8 @@
 p = db.security.addPermission(name='View', klass='user',
         properties=('id', 'username', 'address', 'realname', 'phone',
                     'organisation', 'alternate_addresses', 'timezone',
-                    'roles', 'contrib_form', 'iscommitter', 'homepage'))
+                    'roles', 'contrib_form', 'iscommitter', 'homepage',
+                    'github'))
 db.security.addPermissionToRole('User', p)
 db.security.addPermissionToRole('Developer', p)
 # Coordinator may view all user properties.
@@ -375,7 +377,7 @@
                 'phone', 'organisation',
                 'alternate_addresses',
                 'queries', 'timezone',
-                'homepage'))
+                'homepage', 'github'))
                 # Note: 'roles' excluded - users should not be able to edit 
their own roles.
                 # Also excluded: contrib_form, contrib_form_date, iscommitter
 for r in 'User', 'Developer':
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to