Coder Social home page Coder Social logo

Comments (6)

adubovikov avatar adubovikov commented on May 28, 2024

in the homer 3.5 we have used also dn
https://github.com/sipcapture/homer/blob/homer3/webhomer/class/auth/ldap/auth.php

the fix:

sipcapture/homer@f522ae3

Line 72: Compat: This works for Active Directory, but might horribly break other directory services. Creating a constant in preferences called "ACTIVE_DIRECTORY" and checking that and determining whether to pass $username or $result[0]['dn'] would be better.

we can change it to a php constant variable

from homer-ui.

adubovikov avatar adubovikov commented on May 28, 2024

sipcapture/homer-api@47400c8

and

sipcapture/homer-api@29c4094

please test

from homer-ui.

mmonka avatar mmonka commented on May 28, 2024

should be:
$result[0][LDAP_GROUP_USER][0]
^^
if (!$this->check_filegroup_membership($ds,$result[0][LDAP_GROUP_USER][0])) {

then it works!

from homer-ui.

adubovikov avatar adubovikov commented on May 28, 2024

sipcapture/homer-api@9f42f03

sipcapture/homer-api@c22c2ca

from homer-ui.

mmonka avatar mmonka commented on May 28, 2024

That looks good for us now. But it looks like you have to put the new grp values for admins also to $_SESSION:

diff --git a/api/Authentication/LDAP.php b/api/Authentication/LDAP.php
index dff73e5..b43fc90 100644
--- a/api/Authentication/LDAP.php
+++ b/api/Authentication/LDAP.php
@@ -124,6 +124,7 @@ class LDAP extends Authentication {
if ($value == $param['username']) {
$_SESSION['userlevel'] = 1; # LDAP_ADMINLEVEL;
$user['grp'] = "users,admins";

  •                           $_SESSION['grp'] = "users,admins";
                         }
                     }
                     return $user;
    

from homer-ui.

rbott avatar rbott commented on May 28, 2024

The pull request for this fix has already been accepted. I guess we can close this issue then :-)

from homer-ui.

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.