Working CLA implementation.
This commit is contained in:
parent
a0f13c9667
commit
fafd45c271
19 changed files with 565 additions and 52 deletions
6
fas/.gitignore
vendored
6
fas/.gitignore
vendored
|
@ -1,3 +1,9 @@
|
|||
*~
|
||||
#*#
|
||||
*.mo
|
||||
pubring.gpg
|
||||
secring.gpg
|
||||
trustdb.gpg
|
||||
fas.log
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
|
139
fas/fas/cla.py
Normal file
139
fas/fas/cla.py
Normal file
|
@ -0,0 +1,139 @@
|
|||
import turbogears
|
||||
from turbogears import controllers, expose, paginate, identity, redirect, widgets, validate, validators, error_handler
|
||||
|
||||
import ldap
|
||||
import cherrypy
|
||||
|
||||
import mx.DateTime
|
||||
import gpgme
|
||||
import StringIO
|
||||
|
||||
import fas.fasLDAP
|
||||
|
||||
from fas.fasLDAP import UserAccount
|
||||
from fas.fasLDAP import Person
|
||||
from fas.fasLDAP import Groups
|
||||
from fas.fasLDAP import UserGroup
|
||||
|
||||
from fas.auth import *
|
||||
|
||||
from fas.user import knownUser, userNameExists
|
||||
|
||||
class CLA(controllers.Controller):
|
||||
|
||||
def __init__(self):
|
||||
'''Create a CLA Controller.'''
|
||||
|
||||
@expose(template="fas.templates.cla.index")
|
||||
def index(self):
|
||||
'''Display an explanatory message about the Click-through and Signed CLAs (with links)'''
|
||||
return dict()
|
||||
|
||||
def jsonRequest(self):
|
||||
return 'tg_format' in cherrypy.request.params and \
|
||||
cherrypy.request.params['tg_format'] == 'json'
|
||||
|
||||
@expose(template="fas.templates.error")
|
||||
def error(self, tg_errors=None):
|
||||
'''Show a friendly error message'''
|
||||
if not tg_errors:
|
||||
turbogears.redirect('/')
|
||||
return dict(tg_errors=tg_errors)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.cla.view")
|
||||
def view(self, type=None):
|
||||
'''View CLA'''
|
||||
if type not in ('click', 'sign'):
|
||||
turbogears.redirect('index')
|
||||
userName = turbogears.identity.current.user_name
|
||||
user = Person.byUserName(userName)
|
||||
return dict(type=type, user=user, date=str(mx.DateTime.now()))
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="genshi-text:fas.templates.cla.cla", format="text", content_type='text/plain; charset=utf-8')
|
||||
def download(self, type=None):
|
||||
'''Download CLA'''
|
||||
userName = turbogears.identity.current.user_name
|
||||
user = Person.byUserName(userName)
|
||||
return dict(user=user, date=str(mx.DateTime.now()))
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.cla.sign")
|
||||
def sign(self, signature):
|
||||
'''Sign CLA'''
|
||||
userName = turbogears.identity.current.user_name
|
||||
groupName = 'cla_sign' # TODO: Make this value configurable.
|
||||
ctx = gpgme.Context()
|
||||
data = StringIO.StringIO(signature.file.read())
|
||||
plaintext = StringIO.StringIO()
|
||||
verified = False
|
||||
user = Person.byUserName(userName)
|
||||
try:
|
||||
sigs = ctx.verify(data, None, plaintext)
|
||||
except gpgme.GpgmeError, e:
|
||||
turbogears.flash(_("Your signature could not be verified: '%s'.") % e)
|
||||
return dict()
|
||||
else:
|
||||
if len(sigs):
|
||||
sig = sigs[0]
|
||||
fingerprint = sig.fpr
|
||||
if fingerprint != re.sub('\s', '', user.fedoraPersonKeyId):
|
||||
turbogears.flash(_("Your signature's fingerprint did not match the fingerprint registered in FAS."))
|
||||
return dict()
|
||||
key = ctx.get_key(fingerprint)
|
||||
emails = [];
|
||||
for uid in key.uids:
|
||||
emails.extend([uid.email])
|
||||
if user.mail in emails:
|
||||
verified = True
|
||||
else:
|
||||
turbogears.flash(_('Your key did not match your email.'))
|
||||
return dict()
|
||||
|
||||
# We got a properly signed CLA.
|
||||
cla = plaintext.getvalue()
|
||||
if cla.find('Contributor License Agreement (CLA)') < 0:
|
||||
turbogears.flash(_('The GPG-signed part of the message did not contain a signed CLA.'))
|
||||
return dict()
|
||||
if re.compile('If you agree to these terms and conditions, type "I agree" here: I agree', re.IGNORECASE).match(cla):
|
||||
turbogears.flash(_('The text "I agree" was not found in the CLA.'))
|
||||
return dict()
|
||||
|
||||
# Everything is correct.
|
||||
if 1:
|
||||
Groups.apply(groupName, userName) # Apply...
|
||||
user.sponsor(groupName, userName) # Approve...
|
||||
try:
|
||||
1
|
||||
except:
|
||||
turbogears.flash(_("You could not be added to the '%s' group.") % groupName)
|
||||
return dict()
|
||||
else:
|
||||
turbogears.flash(_("You have successfully signed the CLA. You are now in the '%s' group.") % groupName)
|
||||
return dict()
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.cla.click")
|
||||
def click(self, agree):
|
||||
'''Click-through CLA'''
|
||||
userName = turbogears.identity.current.user_name
|
||||
groupName = 'cla_click' # TODO: Make this value configurable.
|
||||
if agree.lower() == 'i agree':
|
||||
try:
|
||||
p = Person.byUserName(userName)
|
||||
Groups.apply(groupName, userName) # Apply...
|
||||
p.sponsor(groupName, userName) # Approve...
|
||||
except:
|
||||
turbogears.flash(_("You could not be added to the '%s' group.") % groupName)
|
||||
return dict()
|
||||
else:
|
||||
turbogears.flash(_("You have successfully agreed to the click-through CLA. You are now in the '%s' group.") % groupName)
|
||||
else:
|
||||
turbogears.flash(_("You have not agreed to the click-through CLA.") % groupName)
|
||||
return dict()
|
||||
|
|
@ -131,6 +131,7 @@ identity.provider='safas2'
|
|||
|
||||
# identity.soprovider.encryption_algorithm=None
|
||||
|
||||
gpghome = "/home/fedora/ricky/fedora-infrastructure/fas/gnupg"
|
||||
privileged_view_groups = "(^cla_.*)"
|
||||
username_blacklist = "(.*-members)|(.*-sponsors)|(.*-administrators)|(root)|(webmaster)"
|
||||
|
||||
|
|
|
@ -14,9 +14,11 @@ from operator import itemgetter
|
|||
|
||||
from fas.user import User
|
||||
from fas.group import Group
|
||||
from fas.cla import CLA
|
||||
|
||||
from fas.auth import isAdmin, canAdminGroup, canSponsorGroup, canEditUser
|
||||
|
||||
import os
|
||||
import sys
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
@ -26,11 +28,15 @@ sys.setdefaultencoding('utf-8')
|
|||
# log = logging.getLogger("fas.controllers")
|
||||
|
||||
#TODO: Appropriate flash icons for errors, etc.
|
||||
# mmcgrath wonders if it will be handy to expose an encrypted mailer with fas over json for our apps
|
||||
|
||||
class Root(controllers.RootController):
|
||||
|
||||
user = User()
|
||||
group = Group()
|
||||
cla = CLA()
|
||||
|
||||
os.environ['GNUPGHOME'] = config.get('gpghome')
|
||||
|
||||
@expose(template="fas.templates.welcome")
|
||||
def index(self):
|
||||
|
|
|
@ -49,7 +49,8 @@ class Server(object):
|
|||
|
||||
def add(self, base, attributes):
|
||||
''' Add a new group record to LDAP instance '''
|
||||
attributes=[ (k,v) for k,v in attributes.items() ]
|
||||
attributes=[ (str(k).encode('utf8'), str(v).encode('utf8')) for k,v in attributes.items() ]
|
||||
print str(k).encode('utf8')
|
||||
self.ldapConn.add_s(base, attributes)
|
||||
|
||||
def delete(self, base):
|
||||
|
@ -280,7 +281,7 @@ class Groups(object):
|
|||
dt.second,
|
||||
dt.microsecond)
|
||||
|
||||
attributes = { 'cn' : groupName.encode('utf8'),
|
||||
attributes = { 'cn' : groupName,
|
||||
'fedoraRoleApprovaldate' : 'NotApproved',
|
||||
'fedoraRoleCreationDate' : now,
|
||||
'fedoraRoleDomain' : 'None',
|
||||
|
|
|
@ -116,10 +116,7 @@ class Group(controllers.Controller):
|
|||
me = groups[userName]
|
||||
except:
|
||||
me = UserGroup()
|
||||
#searchUserForm.groupName.display('group')
|
||||
#findUser.groupName.display(value='fff')
|
||||
value = {'groupName': groupName}
|
||||
return dict(userName=userName, groups=groups, group=group, me=me, value=value)
|
||||
return dict(userName=userName, groups=groups, group=group, me=me)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@expose(template="fas.templates.group.new")
|
||||
|
@ -141,7 +138,7 @@ class Group(controllers.Controller):
|
|||
if not canCreateGroup(userName):
|
||||
turbogears.flash(_('Only FAS adminstrators can create groups.'))
|
||||
turbogears.redirect('/')
|
||||
try:
|
||||
if 1:
|
||||
fas.fasLDAP.Group.newGroup(groupName,
|
||||
fedoraGroupDesc,
|
||||
fedoraGroupOwner,
|
||||
|
@ -149,6 +146,8 @@ class Group(controllers.Controller):
|
|||
fedoraGroupUserCanRemove,
|
||||
fedoraGroupRequires,
|
||||
fedoraGroupJoinMsg)
|
||||
try:
|
||||
1
|
||||
except:
|
||||
turbogears.flash(_("The group: '%s' could not be created.") % groupName)
|
||||
return dict()
|
||||
|
@ -177,15 +176,7 @@ class Group(controllers.Controller):
|
|||
turbogears.flash(_("You cannot edit '%s'.") % groupName)
|
||||
turbogears.redirect('/group/view/%s' % groupName)
|
||||
group = Groups.groups(groupName)[groupName]
|
||||
value = {'groupName': groupName,
|
||||
'fedoraGroupDesc': group.fedoraGroupDesc,
|
||||
'fedoraGroupOwner': group.fedoraGroupOwner,
|
||||
'fedoraGroupType': group.fedoraGroupType,
|
||||
'fedoraGroupNeedsSponsor': (group.fedoraGroupNeedsSponsor.upper() == 'TRUE'),
|
||||
'fedoraGroupUserCanRemove': (group.fedoraGroupUserCanRemove.upper() == 'TRUE'),
|
||||
'fedoraGroupRequires': group.fedoraGroupRequires,
|
||||
'fedoraGroupJoinMsg': group.fedoraGroupJoinMsg, }
|
||||
return dict(value=value)
|
||||
return dict(group=group)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@validate(validators=editGroup())
|
||||
|
|
|
@ -335,7 +335,7 @@ a
|
|||
|
||||
#footer .copy, #footer .disclaimer
|
||||
{
|
||||
font-size: 1.5ex;
|
||||
font-size: 1.5ex;
|
||||
}
|
||||
|
||||
#footlinks
|
||||
|
@ -440,3 +440,31 @@ form .field input, form .field textarea
|
|||
font-size: 3ex;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
#cla
|
||||
{
|
||||
border: 1px solid #AAAAAA;
|
||||
background: #EEEEEE;
|
||||
padding: 2ex;
|
||||
}
|
||||
|
||||
#cla p
|
||||
{
|
||||
margin: 2ex 0;
|
||||
}
|
||||
|
||||
#cla ol {
|
||||
list-style-type: decimal;
|
||||
margin-left: 3ex;
|
||||
}
|
||||
|
||||
#cla ol ol
|
||||
{
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
#cla ol li
|
||||
{
|
||||
margin: 2ex 0;
|
||||
}
|
||||
|
||||
|
|
0
fas/fas/templates/cla/__init__.py
Normal file
0
fas/fas/templates/cla/__init__.py
Normal file
82
fas/fas/templates/cla/cla.html
Normal file
82
fas/fas/templates/cla/cla.html
Normal file
|
@ -0,0 +1,82 @@
|
|||
<div id="cla">
|
||||
<h3>The Fedora Project
|
||||
Individual Contributor License Agreement (CLA)
|
||||
</h3>
|
||||
<a href="http://www.fedora.redhat.com/licenses/">http://www.fedora.redhat.com/licenses/</a>
|
||||
<p>
|
||||
Thank you for your interest in The Fedora Project (the "Project"). In order to clarify the intellectual property license granted with Contributions from any person or entity, Red hat, Inc. ("Red Hat"), as maintainer of the Project, must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for Your protection as a Contributor as well as the protection of the Project and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||
</p>
|
||||
<p>
|
||||
If you have not already done so, please complete an original signed Agreement. Use black ink, and hand-print or type the items other than the signature. Send the completed Agreement to
|
||||
</p>
|
||||
<address>
|
||||
Fedora Project, c/o Red Hat, Inc.,<br />
|
||||
Attn: Legal Affairs<br />
|
||||
1801 Varsity Drive<br />
|
||||
Raleigh, North Carolina, 27606 U.S.A.
|
||||
</address>
|
||||
<p>
|
||||
If necessary, you may send it by facsimile to the Project at +1-919-754-3704 or e-mail a signed pdf copy of the document to fedora-legal@redhat.com. Please read this document carefully before signing and keep a copy for your records.
|
||||
</p>
|
||||
<p>
|
||||
Full name: ${user.givenName}<br />
|
||||
E-Mail: ${user.mail}<br />
|
||||
Address: ${user.postalAddress}<br />
|
||||
Telephone: ${user.telephoneNumber}
|
||||
<!-- Facsimile: %(facsimile)s -->
|
||||
</p>
|
||||
<p>
|
||||
You and the Project hereby accept and agree to the following terms and conditions:
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
Contributors and Contributions.
|
||||
<ol>
|
||||
<li>
|
||||
The Project and any individual or legal entity that voluntarily submits to the Project a Contribution are collectively addressed herein as "Contributors". For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
</li>
|
||||
<li>
|
||||
A "Contribution" is any original work, including any modification or addition to an existing work, that has been submitted for inclusion in, or documentation of, any of the products owned or managed by the Project, where such work originates from that particular Contributor or from some entity acting on behalf of that Contributor.
|
||||
</li>
|
||||
<li>
|
||||
A Contribution is "submitted" when any form of electronic, verbal, or written communication is sent to the Project, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing or improving software or documentation of the Project, but excluding communication that is conspicuously marked or otherwise designated in writing by you as "Not a Contribution."
|
||||
</li>
|
||||
<li>
|
||||
Any Contribution submitted by you to the Project shall be under the terms and conditions of this License, without any additional terms or conditions, unless you explicitly state otherwise in the submission.
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
Contributor Grant of License. You hereby grant to Red Hat, Inc., on behalf of the Project, and to recipients of software distributed by the Project:
|
||||
<ol>
|
||||
<li>
|
||||
a perpetual, non-exclusive, worldwide, fully paid-up, royalty free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your Contribution and such derivative works; and,
|
||||
</li>
|
||||
<li>
|
||||
a perpetual, non-exclusive, worldwide, fully paid-up, royalty free, irrevocable (subject to Section 3) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your Contribution and derivative works thereof, where such license applies only to those patent claims licensable by you that are necessarily infringed by your Contribution alone or by combination of your Contribution with the work to which you submitted the Contribution. Except for the license granted in this section, you reserve all right, title and interest in and to your Contributions.
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
Reciprocity. As of the date any such litigation is filed, your patent grant shall immediately terminate with respect to any party that institutes patent litigation against you (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the work to which you have contributed, constitutes direct or contributory patent infringement.
|
||||
</li>
|
||||
<li>
|
||||
You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Project, or that your employer has executed a separate Corporate CLA with the Project.
|
||||
</li>
|
||||
<li>
|
||||
You represent that each of your Contributions is your original creation (see section 7 for submissions on behalf of others). You represent that your Contribution submission(s) include complete details of any third-party license or other restriction (including, but not limited to, related copyright, atents and trademarks) of which you are personally aware and which are associated with any part of your Contribution.
|
||||
</li>
|
||||
<li>
|
||||
You are not expected to provide support for your Contributions, except to the extent you desire to provide support. You may provide support for free, for a fee, or not at all. Your Contributions are provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
</li>
|
||||
<li>
|
||||
Should you wish to submit work that is not your original creation, you may submit it to the Project separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
|
||||
</li>
|
||||
<li>
|
||||
You agree to notify the Project of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
|
||||
</li>
|
||||
<li>
|
||||
The Project is under no obligations to accept and include every contribution.
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
154
fas/fas/templates/cla/cla.txt
Normal file
154
fas/fas/templates/cla/cla.txt
Normal file
|
@ -0,0 +1,154 @@
|
|||
The Fedora Project
|
||||
Individual Contributor License Agreement (CLA)
|
||||
http://www.fedora.redhat.com/licenses/
|
||||
|
||||
Thank you for your interest in The Fedora Project (the
|
||||
"Project"). In order to clarify the intellectual property license
|
||||
granted with Contributions from any person or entity, Red hat,
|
||||
Inc. ("Red Hat"), as maintainer of the Project, must have a
|
||||
Contributor License Agreement (CLA) on file that has been signed
|
||||
by each Contributor, indicating agreement to the license terms
|
||||
below. This license is for Your protection as a Contributor as
|
||||
well as the protection of the Project and its users; it does not
|
||||
change your rights to use your own Contributions for any other
|
||||
purpose.
|
||||
|
||||
If you have not already done so, please complete an original signed
|
||||
Agreement. Use black ink, and hand-print or type the items other than
|
||||
the signature. Send the completed Agreement to
|
||||
|
||||
Fedora Project, c/o Red Hat, Inc.,
|
||||
Attn: Legal Affairs
|
||||
1801 Varsity Drive
|
||||
Raleigh, North Carolina, 27606 U.S.A.
|
||||
|
||||
If necessary, you may send it by facsimile to the Project at
|
||||
+1-919-754-3704 or e-mail a signed pdf copy of the document to
|
||||
fedora-legal@redhat.com. Please read this document carefully before
|
||||
signing and keep a copy for your records.
|
||||
|
||||
Full name: ${'%28s' % user.givenName} E-Mail: ${'%17s' % user.mail}
|
||||
|
||||
Address:
|
||||
${user.postalAddress}
|
||||
|
||||
Telephone: ${user.telephoneNumber}
|
||||
|
||||
Facsimile: %(facsimile)s
|
||||
|
||||
You and the Project hereby accept and agree to the following terms and conditions:
|
||||
|
||||
1. Contributors and Contributions.
|
||||
|
||||
A. The Project and any individual or legal entity that
|
||||
voluntarily submits to the Project a Contribution are
|
||||
collectively addressed herein as "Contributors". For legal
|
||||
entities, the entity making a Contribution and all other
|
||||
entities that control, are controlled by, or are under common
|
||||
control with that entity are considered to be a single
|
||||
Contributor. For the purposes of this definition, "control"
|
||||
means (i) the power, direct or indirect, to cause the direction
|
||||
or management of such entity, whether by contract or otherwise,
|
||||
or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such
|
||||
entity.
|
||||
|
||||
B. A "Contribution" is any original work, including any
|
||||
modification or addition to an existing work, that has been
|
||||
submitted for inclusion in, or documentation of, any of the
|
||||
products owned or managed by the Project, where such work
|
||||
originates from that particular Contributor or from some entity
|
||||
acting on behalf of that Contributor.
|
||||
|
||||
C. A Contribution is "submitted" when any form of electronic,
|
||||
verbal, or written communication is sent to the Project,
|
||||
including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking
|
||||
systems that are managed by, or on behalf of, the Project for
|
||||
the purpose of discussing or improving software or
|
||||
documentation of the Project, but excluding communication that
|
||||
is conspicuously marked or otherwise designated in writing by
|
||||
you as "Not a Contribution."
|
||||
|
||||
D. Any Contribution submitted by you to the Project shall be
|
||||
under the terms and conditions of this License, without any
|
||||
additional terms or conditions, unless you explicitly state
|
||||
otherwise in the submission.
|
||||
|
||||
2. Contributor Grant of License. You hereby grant to Red Hat,
|
||||
Inc., on behalf of the Project, and to recipients of software
|
||||
distributed by the Project:
|
||||
|
||||
(a) a perpetual, non-exclusive, worldwide, fully paid-up,
|
||||
royalty free, irrevocable copyright license to reproduce,
|
||||
prepare derivative works of, publicly display, publicly
|
||||
perform, sublicense, and distribute your Contribution and such
|
||||
derivative works; and,
|
||||
|
||||
(b) a perpetual, non-exclusive, worldwide, fully paid-up,
|
||||
royalty free, irrevocable (subject to Section 3) patent license
|
||||
to make, have made, use, offer to sell, sell, import, and
|
||||
otherwise transfer your Contribution and derivative works
|
||||
thereof, where such license applies only to those patent claims
|
||||
licensable by you that are necessarily infringed by your
|
||||
Contribution alone or by combination of your Contribution with
|
||||
the work to which you submitted the Contribution. Except for
|
||||
the license granted in this section, you reserve all right,
|
||||
title and interest in and to your Contributions.
|
||||
|
||||
3. Reciprocity. As of the date any such litigation is filed, your
|
||||
patent grant shall immediately terminate with respect to any
|
||||
party that institutes patent litigation against you (including
|
||||
a cross-claim or counterclaim in a lawsuit) alleging that your
|
||||
Contribution, or the work to which you have contributed,
|
||||
constitutes direct or contributory patent infringement.
|
||||
|
||||
4. You represent that you are legally entitled to grant the above
|
||||
license. If your employer(s) has rights to intellectual
|
||||
property that you create that includes your Contributions, you
|
||||
represent that you have received permission to make
|
||||
Contributions on behalf of that employer, that your employer
|
||||
has waived such rights for your Contributions to the Project,
|
||||
or that your employer has executed a separate Corporate CLA
|
||||
with the Project.
|
||||
|
||||
5. You represent that each of your Contributions is your original
|
||||
creation (see section 7 for submissions on behalf of others).
|
||||
You represent that your Contribution submission(s) include
|
||||
complete details of any third-party license or other
|
||||
restriction (including, but not limited to, related copyright,
|
||||
atents and trademarks) of which you are personally aware and
|
||||
which are associated with any part of your Contribution.
|
||||
|
||||
6. You are not expected to provide support for your Contributions,
|
||||
except to the extent you desire to provide support. You may
|
||||
provide support for free, for a fee, or not at all. Your
|
||||
Contributions are provided on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or
|
||||
conditions of NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
|
||||
A PARTICULAR PURPOSE.
|
||||
|
||||
7. Should you wish to submit work that is not your original
|
||||
creation, you may submit it to the Project separately from any
|
||||
Contribution, identifying the complete details of its source
|
||||
and of any license or other restriction (including, but not
|
||||
limited to, related patents, trademarks, and license
|
||||
agreements) of which you are personally aware, and
|
||||
conspicuously marking the work as "Submitted on behalf of a
|
||||
third-party: [named here]".
|
||||
|
||||
8. You agree to notify the Project of any facts or circumstances
|
||||
of which you become aware that would make these representations
|
||||
inaccurate in any respect.
|
||||
|
||||
9. The Project is under no obligations to accept and include every contribution.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If you agree to these terms and conditions, type "I agree" here:
|
||||
Enter your full name here:
|
||||
E-mail: ${user.mail}
|
||||
Date: ${date}
|
23
fas/fas/templates/cla/click.html
Normal file
23
fas/fas/templates/cla/click.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:include href="../master.html" />
|
||||
<head>
|
||||
<title>Fedora Accounts System</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Click-through CLA -->
|
||||
<h2>Contributor License Agreement</h2>
|
||||
<xi:include href="cla.html" />
|
||||
<form action="${tg.url('/cla/click/%s' % userName)}" method="post">
|
||||
<div>
|
||||
If you agree to these terms and conditions, type "I agree" here: <input type="text" id="agree" name="agree" /><br />
|
||||
Full Name: ${user.givenName}<br />
|
||||
E-mail: ${user.mail}<br />
|
||||
Date: ${date}<br />
|
||||
<input type="submit" value="Submit CLA" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
19
fas/fas/templates/cla/index.html
Normal file
19
fas/fas/templates/cla/index.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:include href="../master.html" />
|
||||
<head>
|
||||
<title>Fedora Accounts System</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fedora Contributor License Agreement</h2>
|
||||
<p>
|
||||
Explanatory text goes here.
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="${tg.url('/cla/view/sign')}">Signed CLA</a></li>
|
||||
<li><a href="${tg.url('/cla/view/click')}">Click-through CLA</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
24
fas/fas/templates/cla/sign.html
Normal file
24
fas/fas/templates/cla/sign.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:include href="../master.html" />
|
||||
<head>
|
||||
<title>Fedora Accounts System</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Signed CLA -->
|
||||
<h2>Contributor License Agreement</h2>
|
||||
<p>
|
||||
Use the below link to download/save the CLA as fedora-icla-${tg.identity.user.user_name}.txt, run gpg -as fedora-icla-${tg.identity.user.user_name}.txt, and upload fedora-icla-${tg.identity.user.user_name}.txt.asc in the form below.
|
||||
</p>
|
||||
<a href="${tg.url('/cla/download')}">Download the CLA text file here!</a>
|
||||
|
||||
<form action="${tg.url('/cla/sign')}" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label for="signature">Signed CLA:</label> <input type="file" id="signature" name="signature" /><br />
|
||||
<input type="submit" value="Submit CLA" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
44
fas/fas/templates/cla/view.html
Normal file
44
fas/fas/templates/cla/view.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:include href="../master.html" />
|
||||
<head>
|
||||
<title>Fedora Accounts System</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Click-through CLA -->
|
||||
<h2>Contributor License Agreement</h2>
|
||||
|
||||
<div py:if="type == 'click'" py:strip=''>
|
||||
<xi:include href="cla.html" />
|
||||
<form action="${tg.url('/cla/click')}" method="post">
|
||||
<div>
|
||||
If you agree to these terms and conditions, type "I agree" here: <input type="text" id="agree" name="agree" /><br />
|
||||
Full Name: ${user.givenName}<br />
|
||||
E-mail: ${user.mail}<br />
|
||||
Date: ${date}<br />
|
||||
<input type="submit" value="Submit CLA" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div py:if="type == 'sign'" py:strip=''>
|
||||
<p>
|
||||
Use the below link to download/save the CLA as fedora-icla-${user.cn}.txt, and run:
|
||||
<pre>gpg -as fedora-icla-${user.cn}.txt</pre>
|
||||
After, upload fedora-icla-${user.cn}.txt.asc in the form below.
|
||||
</p>
|
||||
<p>
|
||||
<a href="${tg.url('/cla/download')}">Download the CLA text file here!</a>
|
||||
</p>
|
||||
|
||||
<form action="${tg.url('/cla/sign')}" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label for="signature">Signed CLA:</label> <input type="file" id="signature" name="signature" /><br />
|
||||
<input type="submit" value="Submit CLA" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -7,33 +7,33 @@
|
|||
<title>Edit Group</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Edit Group</h2>
|
||||
<form action="${tg.url('/group/save/%s' % value['groupName'])}" method="post">
|
||||
<h2>Edit Group: ${group.cn}</h2>
|
||||
<form action="${tg.url('/group/save/%s' % group.cn)}" method="post">
|
||||
<div class="field">
|
||||
<label for="fedoraGroupDesc">Description:</label>
|
||||
<input type="text" id="fedoraGroupDesc" name="fedoraGroupDesc" value="${value['fedoraGroupDesc']}" />
|
||||
<input type="text" id="fedoraGroupDesc" name="fedoraGroupDesc" value="${group.fedoraGroupDesc}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraGroupOwner">Group Owner:</label>
|
||||
<input type="text" id="fedoraGroupOwner" name="fedoraGroupOwner" value="${value['fedoraGroupOwner']}" />
|
||||
<input type="text" id="fedoraGroupOwner" name="fedoraGroupOwner" value="${group.fedoraGroupOwner}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraGroupNeedsSponsor">Needs Sponsor:</label>
|
||||
<input py:if="value['fedoraGroupNeedsSponsor']" type="checkbox" id="fedoraGroupNeedsSponsor" name="fedoraGroupNeedsSponsor" value="TRUE" checked="checked" />
|
||||
<input py:if="not value['fedoraGroupNeedsSponsor']" type="checkbox" id="fedoraGroupNeedsSponsor" name="fedoraGroupNeedsSponsor" value="TRUE" />
|
||||
<input py:if="group.fedoraGroupNeedsSponsor" type="checkbox" id="fedoraGroupNeedsSponsor" name="fedoraGroupNeedsSponsor" value="TRUE" checked="checked" />
|
||||
<input py:if="not group.fedoraGroupNeedsSponsor" type="checkbox" id="fedoraGroupNeedsSponsor" name="fedoraGroupNeedsSponsor" value="TRUE" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraGroupUserCanRemove">Self Removal:</label>
|
||||
<input py:if="value['fedoraGroupUserCanRemove']" type="checkbox" id="fedoraGroupUserCanRemove" name="fedoraGroupUserCanRemove" value="TRUE" checked="checked" />
|
||||
<input py:if="not value['fedoraGroupUserCanRemove']" type="checkbox" id="fedoraGroupUserCanRemove" name="fedoraGroupUserCanRemove" value="TRUE" />
|
||||
<input py:if="group.fedoraGroupUserCanRemove" type="checkbox" id="fedoraGroupUserCanRemove" name="fedoraGroupUserCanRemove" value="TRUE" checked="checked" />
|
||||
<input py:if="not group.fedoraGroupUserCanRemove" type="checkbox" id="fedoraGroupUserCanRemove" name="fedoraGroupUserCanRemove" value="TRUE" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraGroupRequires">Must Belong To:</label>
|
||||
<input type="text" id="fedoraGroupRequires" name="fedoraGroupRequires" value="${value['fedoraGroupRequires']}" />
|
||||
<input type="text" id="fedoraGroupRequires" name="fedoraGroupRequires" value="${group.fedoraGroupRequires}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraGroupJoinMsg">Group Join Message:</label>
|
||||
<input type="text" id="fedoraGroupJoinMsg" name="fedoraGroupJoinMsg" value="${value['fedoraGroupJoinMsg']}" />
|
||||
<input type="text" id="fedoraGroupJoinMsg" name="fedoraGroupJoinMsg" value="${group.fedoraGroupJoinMsg}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="submit" value="Save!" />
|
||||
|
|
|
@ -47,19 +47,21 @@
|
|||
<div id="sidebar">
|
||||
<ul>
|
||||
<li class="first"><a href="${tg.url('/group/list')}">Group List</a></li>
|
||||
<!-- TODO: Make these use auth.py -->
|
||||
<li py:if="'accounts' in tg.identity.groups"><a href="${tg.url('/user/list')}">User List</a></li>
|
||||
<li py:if="'accounts' in tg.identity.groups"><a href="${tg.url('/group/new')}">New Group</a></li>
|
||||
<li><a href="http://fedoraproject.org/wiki/FWN/LatestIssue">News</a></li>
|
||||
<div py:if="'accounts' in tg.identity.groups" py:strip=''>
|
||||
<!-- TODO: Make these use auth.py -->
|
||||
<li><a href="${tg.url('/user/list')}">User List</a></li>
|
||||
<li><a href="${tg.url('/group/new')}">New Group</a></li>
|
||||
</div>
|
||||
<li><a href="${tg.url('/group/list/A*')}">Apply For a new Group</a></li>
|
||||
<li><a href="http://fedoraproject.org/wiki/FWN/LatestIssue">News</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<div id="content">
|
||||
<div py:if="tg_flash" class="flash">
|
||||
${tg_flash}
|
||||
</div>
|
||||
<div py:replace="select('*|text()')" />
|
||||
</div> <!-- End main -->
|
||||
</div>
|
||||
<div id="footer">
|
||||
<ul id="footlinks">
|
||||
<li class="first"><a href="/">About</a></li>
|
||||
|
|
|
@ -8,39 +8,39 @@
|
|||
</head>
|
||||
<body>
|
||||
<h2>Edit Account</h2>
|
||||
<form action="${tg.url('/user/save/%s' % value['userName'])}" method="post">
|
||||
<form action="${tg.url('/user/save/%s' % userName)}" method="post">
|
||||
<div class="field">
|
||||
<label for="givenName">Full Name:</label>
|
||||
<input type="text" id="givenName" name="givenName" value="${value['givenName']}" />
|
||||
<input type="text" id="givenName" name="givenName" value="${user.givenName}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="mail">Email:</label>
|
||||
<input type="text" id="mail" name="mail" value="${value['mail']}" />
|
||||
<input type="text" id="mail" name="mail" value="${user.mail}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraPersonBugzillaMail">Bugzilla Email:</label>
|
||||
<input type="text" id="fedoraPersonBugzillaMail" name="fedoraPersonBugzillaMail" value="${value['fedoraPersonBugzillaMail']}" />
|
||||
<input type="text" id="fedoraPersonBugzillaMail" name="fedoraPersonBugzillaMail" value="${user.fedoraPersonBugzillaMail}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraPersonIrcNick">IRC Nick:</label>
|
||||
<input type="text" id="fedoraPersonIrcNick" name="fedoraPersonIrcNick" value="${value['fedoraPersonIrcNick']}" />
|
||||
<input type="text" id="fedoraPersonIrcNick" name="fedoraPersonIrcNick" value="${user.fedoraPersonIrcNick}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="fedoraPersonKeyId">PGP Key:</label>
|
||||
<input type="text" id="fedoraPersonKeyId" name="fedoraPersonKeyId" value="${value['fedoraPersonKeyId']}" />
|
||||
<input type="text" id="fedoraPersonKeyId" name="fedoraPersonKeyId" value="${user.fedoraPersonKeyId}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="telephoneNumber">Telephone Number:</label>
|
||||
<input type="text" id="telephoneNumber" name="telephoneNumber" value="${value['telephoneNumber']}" />
|
||||
<input type="text" id="telephoneNumber" name="telephoneNumber" value="${user.telephoneNumber}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="postalAddress">Postal Address:</label>
|
||||
<input type="text" id="postalAddress" name="postalAddress" value="${value['postalAddress']}" />
|
||||
<input type="text" id="postalAddress" name="postalAddress" value="${user.postalAddress}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="description ">Description:</label>
|
||||
<textarea id="description" name="description">
|
||||
${value['description']}
|
||||
${user.description}
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
|
|
@ -157,16 +157,7 @@ class User(controllers.Controller):
|
|||
turbogears.flash(_('You cannot edit %s') % userName )
|
||||
userName = turbogears.identity.current.user_name
|
||||
user = Person.byUserName(userName)
|
||||
value = {'userName': userName,
|
||||
'givenName': user.givenName,
|
||||
'mail': user.mail,
|
||||
'fedoraPersonBugzillaMail': user.fedoraPersonBugzillaMail,
|
||||
'fedoraPersonIrcNick': user.fedoraPersonIrcNick,
|
||||
'fedoraPersonKeyId': user.fedoraPersonKeyId,
|
||||
'telephoneNumber': user.telephoneNumber,
|
||||
'postalAddress': user.postalAddress,
|
||||
'description': user.description, }
|
||||
return dict(value=value)
|
||||
return dict(userName=userName, user=user)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@validate(validators=editUser())
|
||||
|
|
2
fas/gnupg/gpg.conf
Normal file
2
fas/gnupg/gpg.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
keyserver hkp://subkeys.pgp.net
|
||||
keyserver-options auto-key-retrieve
|
Loading…
Add table
Add a link
Reference in a new issue