Skip to content

Creating user from LDAP #320

Closed
Closed

Description

@humbertofraga

Which is the correct flow to adding a new user from LDAP?

I've successfully configured the LDAP options to my companie's AD. When logging in, I can see thought the logs (and error_log commands added by myself) that Web2Project can connect to AD an retrieve the user object.

But then, Web2Project tries to store the user object on the database, but there's no permission to that.

I got to the class classes/w2p/Extensions/Permissions.class.php, under function w2Pacl_check, and it is called with relevant parameters $op='add' $userid=-1 $module='users'. On the gacl_permissions table, there's no permission for userid=-1.

If I try to create a new user, there's no option to lookup the LDAP for user info.

What is the correct to add a user from LDAP?

Activity

  1. caseysoftware commented on Jan 31, 2019

    @caseysoftware
    Member

    I haven't dug into the LDAP flows in quite a while but I believe the correct approach is to import the user, assign them roles+permissions, and then they can log in directly.

  2. humbertofraga commented on Jan 31, 2019

    @humbertofraga
    Author

    Ok, understood that.

    But how does the admin import new users? Navigating, I've got to the New User screen, but I can't find any option to import from LDAP.

  3. caseysoftware commented on Jan 28, 2025

    @caseysoftware
    Member

    Did you get this one figured out? I don't have an LDP system to test against but plan to build SAML and OIDC eventually.

  4. caseysoftware commented on Oct 16, 2026

    @caseysoftware
    Member

    Fixed on dev-5.0.0, will ship in 5.0:

    39d27f84 and 27b2354d: a new LDAP user always gets a contact. The contact insert failed (owner -1 on strict servers), so the user was saved without one and didn't appear in User Management.
    d2155ccf: LDAP passwords are hashed once, and the local copy is only updated when it actually changes.
    708285f4: migration 065 gives existing users without a contact a placeholder, so they show up again.

    The intended flow: the user logs in once with LDAP, appears under Inactive Users, and an admin assigns a role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions