문제

I want to write a plugin for redmine. in this plugin i want to limit number of user registration. How can i hook redmine user controller to do this limitation? I don't want to change core redmine code. for example:

if User.count = 10
  do_something
end
도움이 되었습니까?

해결책

You should determine what exactly action you would like to patch. After this you can add before_filter or use alias_method_chain or rewrite method (it is the WORST way) in your plugin. Your patch will influence on the Redmine core.

Some additional info:

  • how to write plugins - official tutorial

  • list of plugins (to see some working examples) - official or try to find on github

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top