mirror of https://github.com/halo-dev/halo
chore: add finalizer for ghost and anonymous users (#3386)
#### What type of PR is this? /kind improvement /area core #### What this PR does / why we need it: 为系统默认用户添加系统保护 finalizer,避免被删除 how to test it? ```shell curl -u username:password --basic 'http://localhost:8090/api/v1alpha1/users/ghost' curl -u username:password --basic 'http://localhost:8090/api/v1alpha1/users/anonymousUser' ``` 将看到 ```json "finalizers": [ "...", "system-protection" ] ``` #### Which issue(s) this PR fixes: Fixes # #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note None ```pull/3363/head^2
parent
3330ff8c3d
commit
f1ec6ceeab
|
@ -2,6 +2,8 @@ apiVersion: v1alpha1
|
|||
kind: User
|
||||
metadata:
|
||||
name: anonymousUser
|
||||
finalizers:
|
||||
- system-protection
|
||||
spec:
|
||||
displayName: Anonymous User
|
||||
email: anonymous@example.com
|
||||
|
@ -12,6 +14,8 @@ apiVersion: v1alpha1
|
|||
kind: User
|
||||
metadata:
|
||||
name: ghost
|
||||
finalizers:
|
||||
- system-protection
|
||||
spec:
|
||||
displayName: 已删除用户
|
||||
email: ghost@example.com
|
||||
|
|
Loading…
Reference in New Issue