Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
redmine_v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
redmine_v2
Commits
80e7aff2
Commit
80e7aff2
authored
Dec 25, 2023
by
Tấn Trần Thanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set up for role view report
parent
7ecc7a25
Pipeline
#1620
canceled with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
plugins/workflow_report/init.rb
+5
-11
No files found.
plugins/workflow_report/init.rb
View file @
80e7aff2
...
@@ -15,20 +15,14 @@ Redmine::Plugin.register :workflow_report do
...
@@ -15,20 +15,14 @@ Redmine::Plugin.register :workflow_report do
application_config
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'config'
,
'application.yml'
)
application_config
=
File
.
join
(
File
.
dirname
(
__FILE__
),
'config'
,
'application.yml'
)
$workflow_report_config
=
YAML
::
load_file
(
configfile
)
$workflow_report_config
=
YAML
::
load_file
(
configfile
)
$app_report_config
=
YAML
::
load_file
(
application_config
)
$app_report_config
=
YAML
::
load_file
(
application_config
)
project_module
:workflow_report
do
permission
:workflow_report_view_and_export
,
{
workflow_report:
%i[index export index_daily_report show_daily_report
index_time_entry export_time_entry]
},
require: :member
end
end
end
Redmine
::
MenuManager
.
map
:top_menu
do
|
menu
|
Redmine
::
MenuManager
.
map
:top_menu
do
|
menu
|
menu
.
push
(
:workflow_report
,
{
controller:
'workflow_report'
,
action:
'index'
},
menu
.
push
(
:workflow_report
,
{
controller:
'workflow_report'
,
action:
'index'
},
caption:
'Workflow Report'
,
caption:
'Workflow Report'
,
if:
proc
{
User
.
current
.
allowed_to_globally?
(
:view_workflow_report
)
})
if:
proc
{
User
.
current
.
allowed_to_globally?
(
:workflow_report_view_and_export
)
})
end
ActionDispatch
::
Reloader
.
to_prepare
do
Redmine
::
AccessControl
.
map
do
|
map
|
map
.
project_module
:workflow_report
do
|
pmap
|
pmap
.
permission
(
:view_workflow_report
,
{
workflow_report:
[
:index
,
:export
],
},
read:
true
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment