From 8896763677381e956958dc32f70a4a5442dfc9ad Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 11:51:07 -0600 Subject: [PATCH 01/46] fix for people who are in group but not approved --- fas/fas/templates/group/view.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/templates/group/view.html b/fas/fas/templates/group/view.html index 318eaa8..235d50e 100644 --- a/fas/fas/templates/group/view.html +++ b/fas/fas/templates/group/view.html @@ -73,7 +73,7 @@ ${role.member.username} ${_('None')} ${role.creation.astimezone(timezone).strftime('%Y-%m-%d %H:%M:%S %Z')} - ${role.approval.astimezone(timezone).strftime('%Y-%m-%d %H:%M:%S %Z')} + ${role.approval.astimezone(timezone).strftime('%Y-%m-%d %H:%M:%S %Z')} ${role.role_status} ${role.role_type} From 9ccae8664b97538fdd57d5254ae2ff6ac61b0d9b Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 11:58:59 -0600 Subject: [PATCH 02/46] More client changes --- fas/client/fasClient.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fas/client/fasClient.py b/fas/client/fasClient.py index 0e3612e..6dba109 100755 --- a/fas/client/fasClient.py +++ b/fas/client/fasClient.py @@ -162,12 +162,13 @@ class MakeShellAccounts(BaseClient): usernames = {} for person in people: uid = person['id'] - username = person['username'] - usernames[uid] = username - file.write("=%i %s:x:%i:\n" % (uid, username, uid)) - file.write("0%i %s:x:%i:\n" % (i, username, uid)) - file.write(".%s %s:x:%i:\n" % (username, username, uid)) - i = i + 1 + if self.is_valid_user(uid): + username = person['username'] + usernames[uid] = username + file.write("=%i %s:x:%i:\n" % (uid, username, uid)) + file.write("0%i %s:x:%i:\n" % (i, username, uid)) + file.write(".%s %s:x:%i:\n" % (username, username, uid)) + i = i + 1 for group in groups: gid = group['id'] @@ -181,9 +182,9 @@ class MakeShellAccounts(BaseClient): except KeyError: ''' No users exist in the group ''' pass - file.write("=%i %s:x:%i:%s\n" % (gid, name, gid, self.memberships)) - file.write("0%i %s:x:%i:%s\n" % (i, name, gid, self.memberships)) - file.write(".%s %s:x:%i:%s\n" % (name, name, gid, self.memberships)) + file.write("=%i %s:x:%i:%s\n" % (gid, name, gid, memberships)) + file.write("0%i %s:x:%i:%s\n" % (i, name, gid, memberships)) + file.write(".%s %s:x:%i:%s\n" % (name, name, gid, memberships)) i = i + 1 file.close() From 64614801471f0b2424ca8ae36c28164de08c5324 Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 12:31:37 -0600 Subject: [PATCH 03/46] fixed paragraph tag --- fas/fas/templates/about.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/templates/about.html b/fas/fas/templates/about.html index c27fe5e..652738a 100644 --- a/fas/fas/templates/about.html +++ b/fas/fas/templates/about.html @@ -12,6 +12,6 @@

${_('Etiquette')}

${_('People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundain task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.')}

${_('Users, Sponsors, Administrators')}

-

${_('Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the disctinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.')} +

${_('Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the disctinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.')}

From 1dc86579fb8aa1572249edbdcba57f1b2df7183b Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 12:34:16 -0600 Subject: [PATCH 04/46] Another tag, ugh sorry for the noise --- fas/fas/templates/about.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/templates/about.html b/fas/fas/templates/about.html index 652738a..83fa534 100644 --- a/fas/fas/templates/about.html +++ b/fas/fas/templates/about.html @@ -10,7 +10,7 @@

${_('FAS - The Open Account System')}

${_('FAS is designed around an open architecture. Unlike the traditional account systems where a single admin or group of admins decide who gets to be in what group, FAS is completely designed to be self operating per team. Every group is given at least one administrator who can then approve other people in the group. Also, unlike traditional account systems. FAS allows people to apply for the groups they want to be in. This paridigm is interesting as it allows anyone to find out who is in what groups and contact them. This openness is brought over from the same philosophies that make Open Source popular.')}

${_('Etiquette')}

-

${_('People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundain task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.')} +

${_('People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundain task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.')}

${_('Users, Sponsors, Administrators')}

${_('Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the disctinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.')}

From 6879e07e7242d8a941ab80ada0ffaca32bd8dc10 Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 12:35:51 -0600 Subject: [PATCH 05/46] Another tag, ugh sorry for the noise --- fas/fas/templates/about.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fas/fas/templates/about.html b/fas/fas/templates/about.html index 83fa534..d6dbd9f 100644 --- a/fas/fas/templates/about.html +++ b/fas/fas/templates/about.html @@ -8,10 +8,10 @@

${_('FAS - The Open Account System')}

-

${_('FAS is designed around an open architecture. Unlike the traditional account systems where a single admin or group of admins decide who gets to be in what group, FAS is completely designed to be self operating per team. Every group is given at least one administrator who can then approve other people in the group. Also, unlike traditional account systems. FAS allows people to apply for the groups they want to be in. This paridigm is interesting as it allows anyone to find out who is in what groups and contact them. This openness is brought over from the same philosophies that make Open Source popular.')}

+

${_('''FAS is designed around an open architecture. Unlike the traditional account systems where a single admin or group of admins decide who gets to be in what group, FAS is completely designed to be self operating per team. Every group is given at least one administrator who can then approve other people in the group. Also, unlike traditional account systems. FAS allows people to apply for the groups they want to be in. This paridigm is interesting as it allows anyone to find out who is in what groups and contact them. This openness is brought over from the same philosophies that make Open Source popular.''')}

${_('Etiquette')}

-

${_('People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundain task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.')}

+

${_("People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundain task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.")}

${_('Users, Sponsors, Administrators')}

-

${_('Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the disctinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.')}

+

${_('''Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the disctinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.''')}

From 3326b9993868d61b88c1cf67fba3063a90cf5dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toshio=20=E3=81=8F=E3=82=89=E3=81=A8=E3=81=BF?= Date: Tue, 4 Mar 2008 18:44:24 +0000 Subject: [PATCH 06/46] Fix get_locale() to make logout() work without traceback. --- fas/fas/controllers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fas/fas/controllers.py b/fas/fas/controllers.py index 8ae178e..2aae449 100644 --- a/fas/fas/controllers.py +++ b/fas/fas/controllers.py @@ -28,9 +28,14 @@ turbogears.view.variable_providers.append(add_custom_stdvars) def get_locale(locale=None): if locale: return locale - if turbogears.identity.current.user_name: + username = None + try: + username = turbogears.identity.current.user_name + except AttributeError: + pass + if username: person = People.by_username(turbogears.identity.current.user_name) - return person.locale + return person.locale or 'C' else: return turbogears.i18n.utils._get_locale() From f7290e84c29b60e9392e255187dd90137c977030 Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 4 Mar 2008 15:55:59 -0600 Subject: [PATCH 07/46] Added some menu ordering. Also added more help --- fas/fas/help.py | 30 +++++++++++++++++++----------- fas/fas/templates/group/list.html | 1 + fas/fas/templates/group/view.html | 6 ++++++ fas/fas/templates/master.html | 6 +++--- fas/fas/templates/user/edit.html | 1 + 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/fas/fas/help.py b/fas/fas/help.py index 23dd5d6..391eacd 100644 --- a/fas/fas/help.py +++ b/fas/fas/help.py @@ -5,17 +5,25 @@ from turbogears.database import session from fas.auth import * class Help(controllers.Controller): - help = { 'none' : ['Error', '

We could not find that help item

'], - 'user_ircnick' : ['IRC Nick (Optional)', '

IRC Nick is used to identify yourself on irc.freenode.net. Please register your nick on irc.freenode.net first, then fill this in so people can find you online when they need to

'], - 'user_primary_email' : ['Primary Email (Required)', '

This email address should be your prefered email contact and will be used to send various official emails to. This is also where your @fedoraproject.org email will get forwarded

'], - 'user_human_name' : ['Full Name (Required)', '

Your Human Name or "real life" name

'], - 'user_gpg_keyid' : ['GPG Key', '

Only required for users signing the CLA. It is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. See the CLAHowTo for more information

'], - 'user_telephone' : ['Telephone', '

Only required for users signing the CLA. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our Privacy Policy

'], - 'user_postal_address': ['Postal Address', '

Only required for users signing the CLA. This should be a mailing address where you can be contacted. See our Privacy Policy about any concerns.

'], - 'user_timezone': ['Timezone (Optional)', '

Please specify the time zone you are in.

'], - 'user_comments': ['Comments (Optional)', '

Misc comments about yourself.

'], - 'user_account_status': ['Account Status', '

Shows account status, possible values include

  • Valid
  • Disabled
  • Expired

'], - 'user_cla' : ['CLA', '

In order to become a full Fedora contributor you must sign a Contributor License Agreement. This license is a legal agreement between you and Red Hat. Full status allows people to contribute content and code and is recommended for anyone interested in getting involved in the Fedora Project. To find out more, see the CLAHowTo.

'], + help = { 'none' : ['Error', '

We could not find that help item

'], + 'user_ircnick' : ['IRC Nick (Optional)', '

IRC Nick is used to identify yourself on irc.freenode.net. Please register your nick on irc.freenode.net first, then fill this in so people can find you online when they need to

'], + 'user_primary_email' : ['Primary Email (Required)', '

This email address should be your prefered email contact and will be used to send various official emails to. This is also where your @fedoraproject.org email will get forwarded

'], + 'user_human_name' : ['Full Name (Required)', '

Your Human Name or "real life" name

'], + 'user_gpg_keyid' : ['GPG Key', '

Only required for users signing the CLA. It is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. See the CLAHowTo for more information

'], + 'user_telephone' : ['Telephone', '

Only required for users signing the CLA. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our Privacy Policy

'], + 'user_postal_address': ['Postal Address', '

Only required for users signing the CLA. This should be a mailing address where you can be contacted. See our Privacy Policy about any concerns.

'], + 'user_timezone': ['Timezone (Optional)', '

Please specify the time zone you are in.

'], + 'user_comments': ['Comments (Optional)', '

Misc comments about yourself.

'], + 'user_account_status': ['Account Status', '

Shows account status, possible values include

  • Valid
  • Disabled
  • Expired

'], + 'user_cla' : ['CLA', '

In order to become a full Fedora contributor you must sign a Contributor License Agreement. This license is a legal agreement between you and Red Hat. Full status allows people to contribute content and code and is recommended for anyone interested in getting involved in the Fedora Project. To find out more, see the CLAHowTo.

'], + 'user_locale': ['Locale', '

For non-english speaking peoples this allows individuals to select which locale they are in.

'], + + 'group_apply': ['Apply', '

Applying for a group is like applying for a job and it can certainly take a while to get in. Many groups have their own rules about how to actually get approved or sponsored. For more information on how the account system works see the about page.

'], + 'group_remove': ['Remove', '''

Removing a person from a group will cause that user to no longer be in the group. They will need to re-apply to get in. Admins can remove anyone, Sponsors can remove users, users can't remove anyone.

'''], + 'group_upgrade': ['Upgrade', '''

Upgrade a persons status in this group.

  • from user -> to sponsor
  • From sponsor -> administrator
  • administrators cannot be upgraded beyond administrator

'''], + 'group_downgrade': ['Downgrade', '''

Downgrade a persons status in the group.

  • from administrator -> to sponsor
  • From sponsor -> user
  • users cannot be downgraded below user, you may want to remove them

'''], + 'group_approve': ['Approve', '''

A sponsor or administrator can approve users to be in a group. Once the user has applied for the group, go to the group's page and click approve to approve the user.

'''], + 'group_sponsor': ['Sponsor', '''

A sponsor or administrator can sponsor users to be in a gruop. Once the user has applied for the group, go to the group's page and click approve to sponsor the user. Sponsorship of a user implies that you are approving a user and may mentor and answer their questions as they come up.

'''], } def __init__(self): diff --git a/fas/fas/templates/group/list.html b/fas/fas/templates/group/list.html index bd925ae..094d3ba 100644 --- a/fas/fas/templates/group/list.html +++ b/fas/fas/templates/group/list.html @@ -45,6 +45,7 @@ ${_('Unapproved')} ${_('Apply')} + diff --git a/fas/fas/templates/group/view.html b/fas/fas/templates/group/view.html index 235d50e..f59418a 100644 --- a/fas/fas/templates/group/view.html +++ b/fas/fas/templates/group/view.html @@ -28,6 +28,7 @@ ${_('Remove me')} +

Group Details ${_('(edit)')}

@@ -81,16 +82,21 @@
  • ${_('Sponsor')} + ${_('Approve')} +
  • ${_('Remove')} +
  • ${_('Upgrade')} +
  • ${_('Downgrade')} +
diff --git a/fas/fas/templates/master.html b/fas/fas/templates/master.html index c11c269..a808d44 100644 --- a/fas/fas/templates/master.html +++ b/fas/fas/templates/master.html @@ -56,14 +56,14 @@

${_('Your Roles')}

From 6530347faf692e3d67920a7b369a96a9c122ff2d Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 11:17:25 -0500 Subject: [PATCH 37/46] Don't show private data when viewing other users. --- fas/fas/templates/group/new.html | 2 +- fas/fas/templates/group/view.html | 2 +- fas/fas/templates/user/view.html | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fas/fas/templates/group/new.html b/fas/fas/templates/group/new.html index 4afa717..8ae2a66 100644 --- a/fas/fas/templates/group/new.html +++ b/fas/fas/templates/group/new.html @@ -35,7 +35,7 @@
- +
diff --git a/fas/fas/templates/group/view.html b/fas/fas/templates/group/view.html index 9160dea..cfa0a1f 100644 --- a/fas/fas/templates/group/view.html +++ b/fas/fas/templates/group/view.html @@ -28,7 +28,7 @@
${_('Remove me')} - +

Group Details ${_('(edit)')}

diff --git a/fas/fas/templates/user/view.html b/fas/fas/templates/user/view.html index 98fde0e..eea161a 100644 --- a/fas/fas/templates/user/view.html +++ b/fas/fas/templates/user/view.html @@ -19,10 +19,11 @@
${_('IRC Nick:')}
${person.ircnick} 
${_('PGP Key:')}
${person.gpg_keyid} 
-
${_('Telephone Number:')}
${person.telephone} 
-
${_('Postal Address:')}
${person.postal_address} 
+
${_('Telephone Number:')}
${person.telephone} 
+
${_('Postal Address:')}
${person.postal_address} 
${_('Comments:')}
${person.comments} 
-
${_('Password:')}
${_('Valid')} (change)
+
${_('Password:')}
${_('Valid')} (change)
+
${_('Account Status:')}
${_('Valid')}
From e05f35858b30fe954bc1cf648179844df2e09906 Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 11:22:30 -0500 Subject: [PATCH 38/46] Make account status actually get info. --- fas/fas/templates/user/view.html | 8 +++++--- fas/fas/user.py | 1 + fas/fas2.sql | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fas/fas/templates/user/view.html b/fas/fas/templates/user/view.html index eea161a..9fa786b 100644 --- a/fas/fas/templates/user/view.html +++ b/fas/fas/templates/user/view.html @@ -23,10 +23,12 @@
${_('Postal Address:')}
${person.postal_address} 
${_('Comments:')}
${person.comments} 
${_('Password:')}
${_('Valid')} (change)
- -
${_('Account Status:')}
${_('Valid')} +
${_('Account Status:')}
+ ${_('Active')} + ${_('Vacation')} + ${_('Inactive')} + ${_('Pinged')}
-
${_('CLA:')}
${_('Signed CLA')} ${_('Click-through CLA')}(${_('GPG Sign it!')}) diff --git a/fas/fas/user.py b/fas/fas/user.py index 51e5509..c6831f0 100644 --- a/fas/fas/user.py +++ b/fas/fas/user.py @@ -273,6 +273,7 @@ class User(controllers.Controller): person.human_name = human_name person.telephone = telephone person.password = '*' + person.status = 'active' person.emails['primary'] = PersonEmails(email=email, purpose='primary') newpass = generate_password() message = turbomail.Message(config.get('accounts_mail'), person.emails['primary'].email, _('Welcome to the Fedora Project!')) diff --git a/fas/fas2.sql b/fas/fas2.sql index 0674f57..1892c60 100644 --- a/fas/fas2.sql +++ b/fas/fas2.sql @@ -56,7 +56,7 @@ CREATE TABLE people ( internal_comments TEXT, ircnick TEXT, last_seen TIMESTAMP WITH TIME ZONE DEFAULT NOW(), - status TEXT, + status TEXT DEFAULT 'active', status_change TIMESTAMP WITH TIME ZONE DEFAULT NOW(), locale TEXT not null DEFAULT 'C', timezone TEXT null DEFAULT 'UTC', From 423fa7b0841a9fead66b1979c9fd965215289697 Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 11:27:23 -0500 Subject: [PATCH 39/46] Fix target/person mixup --- fas/fas/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/group.py b/fas/fas/group.py index 5029664..5143ab3 100644 --- a/fas/fas/group.py +++ b/fas/fas/group.py @@ -337,7 +337,7 @@ propagate into the e-mail aliases and CVS repository within an hour. %(joinmsg)s ''') % {'group': group.name, 'name': person.human_name, 'email': person.emails['primary'].email, 'joinmsg': group.joinmsg} turbomail.enqueue(message) - turbogears.flash(_("'%s' has been sponsored!") % person.human_name) + turbogears.flash(_("'%s' has been sponsored!") % target.human_name) turbogears.redirect('/group/view/%s' % group.name) return dict() From d27f674cafbfe72229f9c6940a53b6621a4ae0ed Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 11:40:11 -0500 Subject: [PATCH 40/46] Let's see if this helps the /accounts/accounts problem. --- fas/dev.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/dev.cfg b/fas/dev.cfg index 8241698..417e454 100644 --- a/fas/dev.cfg +++ b/fas/dev.cfg @@ -54,7 +54,7 @@ tg.strict_parameters = True server.webpath='/accounts' base_url_filter.on=True -base_url_filter.base_url = "http://localhost:8088/accounts" +base_url_filter.base_url = "https://publictest10.fedoraproject.org/accounts" # Make the session cookie only return to the host over an SSL link # Disabled for testing. From 124eaf78111507876dde01c1dd2ec63e1fa9a699 Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 12:02:35 -0500 Subject: [PATCH 41/46] This is way easier (and should be equivalent). --- fas/fas/controllers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/controllers.py b/fas/fas/controllers.py index 15e0732..e4c096d 100644 --- a/fas/fas/controllers.py +++ b/fas/fas/controllers.py @@ -103,7 +103,7 @@ class Root(controllers.RootController): # is better. return dict(user = identity.current.user) if not forward_url: - forward_url = config.get('base_url_filter.base_url') + '/' + forward_url = '/' raise redirect(forward_url) forward_url=None From d91113173f93b8cd7e3305938ad98acc7f5531e7 Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 12:05:30 -0500 Subject: [PATCH 42/46] "Fixed" the wrong one. --- fas/fas/controllers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fas/fas/controllers.py b/fas/fas/controllers.py index e4c096d..c875b85 100644 --- a/fas/fas/controllers.py +++ b/fas/fas/controllers.py @@ -117,7 +117,7 @@ class Root(controllers.RootController): "this resource.") else: msg=_("Please log in.") - forward_url= request.headers.get("Referer", "/") + forward_url= '/' ### FIXME: Is it okay to get rid of this? #cherrypy.response.status=403 From c6e24a90babb00d85b60ce9e67d7021d89e0037d Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Wed, 5 Mar 2008 11:07:08 -0600 Subject: [PATCH 43/46] added some better info to the 'home' screen as well as re-arranged menu items --- fas/fas/controllers.py | 9 ++++++++- fas/fas/templates/home.html | 20 ++++++++++++++++++++ fas/fas/templates/master.html | 7 ++++--- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/fas/fas/controllers.py b/fas/fas/controllers.py index 15e0732..48cc176 100644 --- a/fas/fas/controllers.py +++ b/fas/fas/controllers.py @@ -13,6 +13,7 @@ from fas.group import Group from fas.cla import CLA from fas.json_request import JsonRequest from fas.help import Help +from fas.auth import * #from fas.openid_fas import OpenID import os @@ -74,7 +75,13 @@ class Root(controllers.RootController): @expose(template="fas.templates.home", allow_json=True) @identity.require(identity.not_anonymous()) def home(self): - return dict() + user_name = turbogears.identity.current.user_name + person = People.by_username(user_name) + cla = None + if signedCLAPrivs(person): + cla = 'signed' + + return dict(person=person, cla=cla) @expose(template="fas.templates.about") def about(self): diff --git a/fas/fas/templates/home.html b/fas/fas/templates/home.html index 0013343..c64eb8b 100644 --- a/fas/fas/templates/home.html +++ b/fas/fas/templates/home.html @@ -7,5 +7,25 @@ ${_('Fedora Accounts System')} + +

Todo queue:

+ +
+ +
+
    +
  • + ${Markup(_('<strong>%(user)s</strong> requests approval to join <a href="group/view/%(group)s">%(group)s</a>.') % {'user': role.member.username, 'group': group.name, 'group': group.name})} +
  • +
+
+
+
+
+ diff --git a/fas/fas/templates/master.html b/fas/fas/templates/master.html index de5c18a..fde9e5f 100644 --- a/fas/fas/templates/master.html +++ b/fas/fas/templates/master.html @@ -56,14 +56,15 @@
-
+
+
Warning: This is a test instance!
+
    +
  • Avoid entering private info here.
  • +
  • The database may be wiped/rebuilt periodically.
  • +
  • Feel free to file bugs, enhancements, etc. at https://fedorahosted.org/fas2/
  • +
+
+
${tg_flash}
From 0a5339b2f6b02bc8a97e63ec3cd82948fbf2429a Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Wed, 5 Mar 2008 12:41:58 -0500 Subject: [PATCH 46/46] Hopefully fix boolean type bug. --- fas/fas/group.py | 8 ++++---- fas/fas/templates/group/new.html | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fas/fas/group.py b/fas/fas/group.py index 5143ab3..f896c77 100644 --- a/fas/fas/group.py +++ b/fas/fas/group.py @@ -165,8 +165,8 @@ class Group(controllers.Controller): group.display_name = display_name group.owner_id = person_owner.id group.group_type = group_type - group.needs_sponsor = needs_sponsor - group.user_can_remove = user_can_remove + group.needs_sponsor = bool(needs_sponsor) + group.user_can_remove = bool(user_can_remove) if prerequisite: prerequisite = Groups.by_name(prerequisite) group.prerequisite = prerequisite @@ -224,8 +224,8 @@ class Group(controllers.Controller): group.display_name = display_name group.owner = owner group.group_type = group_type - group.needs_sponsor = needs_sponsor - group.user_can_remove = user_can_remove + group.needs_sponsor = bool(needs_sponsor) + group.user_can_remove = bool(user_can_remove) if prerequisite: prerequisite = Groups.by_name(prerequisite) group.prerequisite = prerequisite diff --git a/fas/fas/templates/group/new.html b/fas/fas/templates/group/new.html index 8ae2a66..7f93f8d 100644 --- a/fas/fas/templates/group/new.html +++ b/fas/fas/templates/group/new.html @@ -27,11 +27,11 @@
- +
- +