Code Monkey home page Code Monkey logo

Comments (2)

hermiti avatar hermiti commented on August 17, 2024

If I bypass the allowed_to_login method which checks all of the group and ous then the delay is gone. I would think that it would be better to check to see if the user actually needs the application to verify if it is needed to traverse the users group and uo assignments prior to doing so.

The original code:

def self.allowed_to_login(user)
  (allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested) && allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous))
end

Here would be an alternative:

def self.allowed_to_login(user)
  #Only inspect groups and organizations if required
  (((@config.allowed_groups.blank? && @config.denied_groups.blank?) || allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested)) && ((@config.allowed_ous.blank? && @config.denied_ous.blank?) || allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous)))
end

On a side note allowed_ous and denied_ous are not mentioned in the default config. Cn_groups_nested an dn_ous need some love to help with this issue for those users that do have to verify group and ou membership.

from adauth.

Arcath avatar Arcath commented on August 17, 2024

Will look into tidying this up ASAP

from adauth.

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.