Created
May 3, 2010 13:39
-
-
Save meineerde/388097 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'redmine' | |
Redmine::Plugin.register :my_plugin do | |
[...] | |
project_module :my_module do | |
permission :read_my_stuff, :my_controller => [:first_action, :second_action] | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyController < ApplicationController | |
unloadable | |
before_filter :find_project | |
before_filter :authorize | |
def first_action | |
# only entered if user has read_my_stuff permission and the project has the module my_module enabled | |
[...] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment