Skip to content

Add empty state when user tries to view a group-level branch rule on the project level

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Context

See !208771 (comment 2823214240)

In #569901 !208771 (merged), users are prevented from editing a group-level branch rule on the project level to reduce confusion. Users can still manually edit their url to navigate to a group-level branch rule page in the project-level branch rule section.

Ex: http://gdk.test:8080/flightjs/Flight/-/settings/repository/branch_rules?branch=\*-group-level

When users manually navigate to a group-level branch rule page inside the project-level branch rule section, display an empty state.

Design proposal

Current state from !208771 (merged)

Proposed

Screenshot_2025-10-14_at_14.59.59.png

User DOES have permission to view group-level Protected Branches

empty state for group level branch rule in project level_ with permission.jpg

User DOES NOT have permission to view group-level Protected Branches

empty state for group level branch rule in project level_ without permission.jpg

Illustration: https://gitlab.com/gitlab-org/gitlab-svgs/blob/main/illustrations/empty-state/empty-groups-md.svg

Edited by 🤖 GitLab Bot 🤖