# Bug OP-13213 - "share_calendars" permission does not register dependencies and contract actions

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.0.2 |
| Observed in versions |  |
| Sprint | 13.0.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| 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

## Bug description

When inspecting the `:shared_calendars` permission, its controller actions are inter-mingled with its dependencies and contract actions, meaning that these are not being checked accordingly if need be or producing false positives.

```ruby
[1] pry(main)> OpenProject::AccessControl.permission(:share_calendars)
=> #<OpenProject::AccessControl::Permission:0x000000011ba54a80
 @contract_actions=[],
 @controller_actions=["dependencies/view_calendar", "contract_actions/{:calendar=>[:read]}"],
 @dependencies=[],
 @enabled=true,
 @global=false,
 @grant_to_admin=true,
 @name=:share_calendars,
 @project_module=:calendar_view,
 @public=false,
 @require=nil>
```

## Expected behavior

*   `:contract_actions` are set appropriately
*   `:dependencies` are set appropriately
