Skip to content

Commit 134ffc8

Browse files
committed
Change ViewCustomize.context.user.last_login_on to lastLoginOn
1 parent 74f1796 commit 134ffc8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.ja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ViewCustomize = {
9595
"admin": true,
9696
"firstname": "Redmine",
9797
"lastname": "Admin",
98-
"last_login_on": "2019-09-22T14:44:53Z",
98+
"lastLoginOn": "2019-09-22T14:44:53Z",
9999
"groups": [
100100
{"id": 5, "name": "Group1"}
101101
],

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ViewCustomize = {
101101
"admin": true,
102102
"firstname": "Redmine",
103103
"lastname": "Admin",
104-
"last_login_on": "2019-09-22T14:44:53Z",
104+
"lastLoginOn": "2019-09-22T14:44:53Z",
105105
"groups": [
106106
{"id": 5, "name": "Group1"}
107107
],

lib/view_customize/view_hook.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def create_view_customize_context(view_hook_context)
9090
"admin" => user.admin?,
9191
"firstname" => user.firstname,
9292
"lastname" => user.lastname,
93-
"last_login_on" => (user.last_login_on.iso8601 unless user.last_login_on.nil?),
93+
"lastLoginOn" => (user.last_login_on.iso8601 unless user.last_login_on.nil?),
9494
"groups" => user.groups.map {|group| { "id" => group.id, "name" => group.name }},
9595
"apiKey" => (user.api_token.value unless user.api_token.nil?),
9696
"customFields" => user.custom_field_values.map {|field| { "id" => field.custom_field.id, "name" => field.custom_field.name, "value" => field.value }}

0 commit comments

Comments
 (0)