From cbfc321fc3f47a82bb57197e26e1a39705a7da89 Mon Sep 17 00:00:00 2001 From: Chris Beach Date: Mon, 6 Aug 2018 12:06:53 -0500 Subject: [PATCH 1/3] Create ScriptedUserProfileJson.md --- .../ScriptedUserProfileJson.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 openequella-scripting/ScriptedUserProfileJson.md diff --git a/openequella-scripting/ScriptedUserProfileJson.md b/openequella-scripting/ScriptedUserProfileJson.md new file mode 100644 index 0000000..4f5c629 --- /dev/null +++ b/openequella-scripting/ScriptedUserProfileJson.md @@ -0,0 +1,17 @@ +#Scripted User Profile JSON +Currently, a given user cannot view their own user profile via the API. Until that functionality is implemented in the codebase, the following method can be used: + +1. Setup a collection with a display template that is scripted with the following: +``` +
+{ + "id": "${user.getID()}", + "username": "${user.getUsername()}", + "firstName": "${user.getFirstName()}", + "lastName": "${user.getLastName()}", + "emailAddress": "${user.getEmail()}" +} +
+``` +1. Contribute an item to that collection. Any user that hits that item summary will have access to JSON of their user's profile. +2. Setup a shortcut URL `/s/profile` to point to the item contributed above. From 5d763997b8bec5effb0ebaf987d368aef45f4441 Mon Sep 17 00:00:00 2001 From: Chris Beach Date: Mon, 6 Aug 2018 12:07:17 -0500 Subject: [PATCH 2/3] Update ScriptedUserProfileJson.md --- openequella-scripting/ScriptedUserProfileJson.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openequella-scripting/ScriptedUserProfileJson.md b/openequella-scripting/ScriptedUserProfileJson.md index 4f5c629..954f6db 100644 --- a/openequella-scripting/ScriptedUserProfileJson.md +++ b/openequella-scripting/ScriptedUserProfileJson.md @@ -1,4 +1,4 @@ -#Scripted User Profile JSON +# Scripted User Profile JSON Currently, a given user cannot view their own user profile via the API. Until that functionality is implemented in the codebase, the following method can be used: 1. Setup a collection with a display template that is scripted with the following: From fa2f142b18bc1286cdd88969a31c66e5eeecf0a8 Mon Sep 17 00:00:00 2001 From: Chris Beach Date: Mon, 6 Aug 2018 12:08:30 -0500 Subject: [PATCH 3/3] Update ScriptedUserProfileJson.md --- openequella-scripting/ScriptedUserProfileJson.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openequella-scripting/ScriptedUserProfileJson.md b/openequella-scripting/ScriptedUserProfileJson.md index 954f6db..fc1f86b 100644 --- a/openequella-scripting/ScriptedUserProfileJson.md +++ b/openequella-scripting/ScriptedUserProfileJson.md @@ -1,7 +1,7 @@ # Scripted User Profile JSON Currently, a given user cannot view their own user profile via the API. Until that functionality is implemented in the codebase, the following method can be used: -1. Setup a collection with a display template that is scripted with the following: +* Setup a collection with a display template that is scripted with the following: ```
{ @@ -13,5 +13,5 @@ Currently, a given user cannot view their own user profile via the API. Until t }
``` -1. Contribute an item to that collection. Any user that hits that item summary will have access to JSON of their user's profile. -2. Setup a shortcut URL `/s/profile` to point to the item contributed above. +* Contribute an item to that collection. Any user that hits that item summary will have access to JSON of their user's profile. +* Setup a shortcut URL `/s/profile` to point to the item contributed above.