FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 09-29-2008, 04:10 PM
"Yaakov Nemoy"
 
Default fas/auth.py fas/json_request.py

I actually like this code. Just issue a revert patch to my code, or,
i'll do it myself. I suggest we name the function something more
generic though. I like 'group_list' like we have 'email_list', but
anything goes.

-Yaakov

On Sun, Sep 28, 2008 at 10:32 PM, Ricky Zhou (周家杰)
<ricky@fedoraproject.org> wrote:
> fas/auth.py | 2 +-
> fas/json_request.py | 14 ++++++++++++++
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> New commits:
> commit cc20015bb73b0e18b91632dc452af0d8f614ab5a
> Author: Ricky Zhou <ricky@fedoraproject.org>
> Date: Sun Sep 28 22:32:37 2008 -0400
>
> Initial fas_client method.
>
> diff --git a/fas/auth.py b/fas/auth.py
> index 070259a..087ef2a 100644
> --- a/fas/auth.py
> +++ b/fas/auth.py
> @@ -89,7 +89,7 @@ def CLADone(person):
> '
> Returns True if the user has completed the CLA
> '
> - cla_done_group =config.get('cla_done_group')
> + cla_done_group = config.get('cla_done_group')
> try:
> if person.group_roles[cla_done_group].role_status == 'approved':
> return True
> diff --git a/fas/json_request.py b/fas/json_request.py
> index d762ed4..e56bfc3 100644
> --- a/fas/json_request.py
> +++ b/fas/json_request.py
> @@ -27,6 +27,7 @@ import sqlalchemy
>
> from fas.model import People
> from fas.model import Groups
> +from fas.model import PersonRoles
>
> class JsonRequest(controllers.Controller):
> def __init__(self):
> @@ -57,6 +58,19 @@ class JsonRequest(controllers.Controller):
>
> @identity.require(turbogears.identity.not_anonymou s())
> @expose("json", allow_json=True)
> + def fas_client(self):
> + output = [];
> + try:
> + roles = PersonRoles.query.all()
> + for role in roles:
> + role.member.filter_private()
> + output.append((role.member, role.role_type, role.group.name))
> + return dict(success=True, output=output)
> + except InvalidRequestError:
> + return dict(success=False)
> +
> + @identity.require(turbogears.identity.not_anonymou s())
> + @expose("json", allow_json=True)
> def person_by_username(self, username):
> try:
> person = People.by_username(username)
>
>
>

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 

Thread Tools




All times are GMT. The time now is 04:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org