Skip to content

Commit bf320a9

Browse files
committed
Fix not working with Redmine 3.3 or lower
1 parent ea9c73e commit bf320a9

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

README.ja.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ ViewCustomize = {
9595
"groups": [
9696
{"id": 5, "name": "Group1"}
9797
],
98-
"roles": [ // ユーザに紐づく全てのロール(全プロジェクト)
99-
{"id": 4, "name": "Developer"},
100-
{"id": 6, "name": "RoleX"}
101-
],
10298
"apiKey": "3dd35b5ad8456d90d21ef882f7aea651d367a9d8",
10399
"customFields": [
104100
{"id": 1, "name": "[Custom field] Text", "value": "text"},
@@ -109,7 +105,7 @@ ViewCustomize = {
109105
"project": {
110106
"identifier": "project-a",
111107
"name": "Project A",
112-
"roles": [ // プロジェクト内でのロール
108+
"roles": [
113109
{"id": 6, "name": "RoleX"}
114110
]
115111
},

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ ViewCustomize = {
103103
"groups": [
104104
{"id": 5, "name": "Group1"}
105105
],
106-
"roles": [ // All roles associated with users (all projects)
107-
{"id": 4, "name": "Developer"},
108-
{"id": 6, "name": "RoleX"}
109-
],
110106
"apiKey": "3dd35b5ad8456d90d21ef882f7aea651d367a9d8",
111107
"customFields": [
112108
{"id": 1, "name": "[Custom field] Text", "value": "text"},
@@ -117,7 +113,7 @@ ViewCustomize = {
117113
"project": {
118114
"identifier": "project-a",
119115
"name": "Project A",
120-
"roles": [ // Roles in the project
116+
"roles": [
121117
{"id": 6, "name": "RoleX"}
122118
]
123119
},

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name 'View Customize plugin'
55
author 'onozaty'
66
description 'View Customize plugin for Redmine'
7-
version '1.2.0'
7+
version '1.2.1'
88
url 'https://github.com/onozaty/redmine-view-customize'
99
author_url 'https://github.com/onozaty'
1010

lib/view_customize/view_hook.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def create_view_customize_context(view_hook_context)
7979
"firstname" => user.firstname,
8080
"lastname" => user.lastname,
8181
"groups" => user.groups.map {|group| { "id" => group.id, "name" => group.name }},
82-
"roles" => user.roles.map {|role| { "id" => role.id, "name" => role.name }},
8382
"apiKey" => (user.api_token.value unless user.api_token.nil?),
8483
"customFields" => user.custom_field_values.map {|field| { "id" => field.custom_field.id, "name" => field.custom_field.name, "value" => field.value }}
8584
}

0 commit comments

Comments
 (0)