allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [9/9] git commit: [#7292] add user full name; adjust profile_url field name
Date Mon, 21 Apr 2014 17:24:08 GMT
[#7292] add user full name; adjust profile_url field name


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/1b79f47c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1b79f47c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1b79f47c

Branch: refs/heads/master
Commit: 1b79f47c370923d7d8e0fc9249a13d32b7e724c1
Parents: 1ed540f
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Mon Apr 21 17:20:45 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Apr 21 17:23:30 2014 +0000

----------------------------------------------------------------------
 Allura/allura/ext/user_profile/user_main.py | 1 +
 Allura/allura/model/project.py              | 2 +-
 Allura/allura/tests/functional/test_rest.py | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/1b79f47c/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 8f2a373..2f71deb 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -308,6 +308,7 @@ class PersonalDataSection(ProfileSectionBase):
         auth_provider = AuthenticationProvider.get(request)
         return dict(
             username=self.user.username,
+            name=self.user.display_name,
             joined=auth_provider.user_registration_date(self.user),
             localization=self.user.get_pref('localization')._deinstrument(),
             sex=self.user.get_pref('sex'),

http://git-wip-us.apache.org/repos/asf/allura/blob/1b79f47c/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 3f68e94..1fe11b8 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1026,7 +1026,7 @@ class Project(MappedClass, ActivityNode, ActivityObject):
             ]
         )
         if self.is_user_project:
-            result['profile_url'] = h.absurl('/rest' + self.url() + 'profile/')
+            result['profile_api_url'] = h.absurl('/rest' + self.url() + 'profile/')
         return result
 
     def doap(self):

http://git-wip-us.apache.org/repos/asf/allura/blob/1b79f47c/Allura/allura/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py
index 7bc2334..83889c1 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -298,6 +298,7 @@ class TestUserProfile(TestRestApiBase):
         assert_equal(r.content_type, 'application/json')
         json = r.json
         assert_equal(json['username'], 'test-admin')
+        assert_equal(json['name'], 'Test Admin')
         assert_in('availability', json)
         assert_in('joined', json)
         assert_in('localization', json)


Mime
View raw message