Protected packages: Show protection info in package detail page
In previous issues the possibility was added to protected packages from push and delete, e.g. #416382, #323970, etc.
Given this new possibility, we need to make sure that users are able to easily identify protected packages in the different pages related to the package registry. This avoids confusion and unnecessary overhead. This issue discusses and aligns the design concept and other implementation details.
Parts of this proposal have been taken from the discussion in another issue.
This issue belongs to the EPIC Identify packages as protected to prevent accid... (&5574)
Proposal
For the package detail page, we propose to add two badges related to the package protection. This was already discussed in another MR discussion.
The first badge "Protected from current user" (<= wording to be refinded) will be shown when the current user is not allowed to push to the package because of a packages protection rule.
The second badge "Protection rule in place" when any protection rule exists and matches the package.
Implementation plan
-
Involve UX team, see !146206 (merged) -
Implement badge to show protection info in package detail page, !146206 (merged) -
Shorten GraphQL field packageProtectionRule
, see !151881 (merged)