# Bug OP-10448 - LDAP user synchronization - administrator  flag is overwritten 

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-10448

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 12.1.4 |
| Observed in versions | 12.1.0 |
| Sprint | 12.1.4 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

\[root@project ~\]# cat /etc/redhat-release  
Red Hat Enterprise Linux release 8.5 (Ootpa)

### **Steps to reproduce:**

1.  Administration
2.  Select Users and permissions
3.  Select LDAP user (in1095Adm)
4.  Set Administrator flag to TRUE
5.  Save
6.  In command prompt run ldap sync: _openproject run rake ldap:sync name=in-ldap  logins=in1095Adm_
7.  The user administration flag is set to FALSE

### **Actual Behavior**

When using LDAP as a user repository, and the settings for LDAP attribute mapping Admin is empty.

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/32215/content"></div></figure>

If we set the user Administrator flag to TRUE:

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/32216/content"></div></figure>

After LDAP synchronization for this user: _openproject run rake ldap:sync name=in-ldap  logins=in1095Adm_

The Administrator flag is set to FALSE.

  

### **Expected Behavior**

LDAP synchronization task will not overwrite the user Administrator flag if the LDAP attribute mapping Admin is empty.
