# Bug OP-19108 - Role not created properly when unselecting all permissions

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Administration / Roles and permissions / Project roles and permissions |
| Target versions | 17.5.0 |
| Observed in versions | 17.3.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.3.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 | Mir Bhatia |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Go to Administration &gt; Users and permissions &gt; Roles and permissions
    
2.  Click &quot;+ Role&quot; button
    
3.  Unselect ALL permissions
    
4.  Create the role
    
5.  Open that role again to check the selected permissions
    

### What is the buggy behavior?

*   Despite having unselected all permissions, some are still checked (is it the default selection?)
    

I experienced this in the past but somehow never created a bug for it. Here it is.

### What is the expected behavior?

1.  No permissions should be checked
    

Note: for an update, unselecting all and save works as expected

### Environment information

**OpenProject installation type**

*   Hosted cloud edition
    
*   Packaged installation
    
    *   What distribution?
        
*   Docker All-in-one container
    
*   Docker-compose installation
    
*   Other (please specify)
    

**OpenProject version**

to-be-released 17.3.0

happens also in `dev`

**Browser**

*   [ ] Chrome
*   [x] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Operating System**

*   [ ] Windows
*   [x] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [ ] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)
