Project

General

Profile

Simple plugin

Added by Bertrand Larat about 14 years ago

Hi, I'm a newbie in Ruby and i have some problems to develop a simple Redmine Plugin.

My problem is very simple :
I want to add a new permission about the issue tracking.
This permission allow an user to view issues if he had some caracteristics (ex. "His Lastname is equal to a custom field of the issues").

The aim is to have some users with an altered vision of the issues list. (those users will not have other Issue tracking permission)

I start in Ruby and Redmine, it's very difficult for me... (strange langage!)

I have created a plugin,
altered my init.rb

...
project_module :issue_tracking do |map|
    map.permission :view_special_issue, { }
...

I made an overide a the issue_controller.rb, specialy the index function.
I found the way to check if the right is enabled

...
if User.current.allowed_to?(:view_special_issue, @project , :global => true) then
...

but now, I am little bit lost...
Did someone have an idea to make the good request ?
is it the good way ?

Thanks a lot for reading me, and sorry for my nonacademic english.

Bertrand