Search code examples
buttonregistrationredmine

Disable register button Redmine


Is it possible to remove register button in code in Redmine, I know that I can disable in admin panel, but I need remove it in code. I used helm install to install Redmine


Solution

  • You can delete below code from lib/redmine.rb

    Find the:

    Redmine::MenuManager.map :account_menu do |menu|
      menu.push :login, :signin_path, :if => Proc.new {!User.current.logged?}
      menu.push :register, :register_path,
                :if => Proc.new {!User.current.logged? && Setting.self_registration?}
    

    and delete or comment following two lines:

      menu.push :register, :register_path,
                :if => Proc.new {!User.current.logged? && Setting.self_registration?}
    

    After that restart Redmine...