Coder Social home page Coder Social logo

Comments (4)

akiko-pusu avatar akiko-pusu commented on August 17, 2024

Hi, @nakat-t
Thank you so much for your reporting this problem, any information is highly appreciated.
I’m going to review and fix soon.

from redmine_issue_badge.

akiko-pusu avatar akiko-pusu commented on August 17, 2024

@nakat-t
I could reproduce above situation, and thank you so much your information again.
As you supposed, this is because ajax request to issue badge controller is blocked and redirected in case user is required password change, due to application controller.

Here is a quick workaround:

  1. Prevent to render contend in case ajax request is redirected and not include issue badge template.
--- a/assets/javascripts/issue_badge.js
+++ b/assets/javascripts/issue_badge.js
@@ -5,7 +5,9 @@ function load_badge(url) {
         async: true,
         type: 'get'
     }).done(function( html ) {
-        $('#loggedas').after(html);
+        if ($(html).filter('div#issue_badge').length) {
+            $('#loggedas').after(html);
+        }
     });
 }
  1. Prevent to load javascript in case user is required password change.
--- a/lib/issue_badge/application_hooks.rb
+++ b/lib/issue_badge/application_hooks.rb
@@ -6,7 +6,7 @@ module IssueBadge
       base_url = Redmine::Utils.relative_url_root
       badge_url = base_url + '/issue_badge'
       o = ''
-      if User.current.logged?
+      if User.current.logged? && User.current.change_password_allowed?
         global_enabled = Setting.plugin_redmine_issue_badge['activate_for_all_users'] == 'true'
         o = stylesheet_link_tag('style', plugin: 'redmine_issue_badge')
         if User.current.pref.issue_badge || global_enabled

Anyway, I’m going to fix this as soon as possible.

from redmine_issue_badge.

akiko-pusu avatar akiko-pusu commented on August 17, 2024

I’ve applied bug fix into master branch. Thank you so much!

from redmine_issue_badge.

nakat-t avatar nakat-t commented on August 17, 2024

I verified that it was fixed in master. Thank you very much for your work.

from redmine_issue_badge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.