docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// 素材显式授权由有效 admin 管理;授权写入与撤销都先取得相同的工作区/素材权限锁。
|
||||
package platform
|
||||
|
||||
import "net/http"
|
||||
|
||||
// materialGrants 返回最多一千条显式授权,或按账户 upsert editor/viewer;不允许授予素材 admin。
|
||||
func (s *service) materialGrants(w http.ResponseWriter, r *http.Request, project, account string) error {
|
||||
workspace, material := r.PathValue("workspace"), r.PathValue("material")
|
||||
if r.Method != http.MethodGet && r.Method != http.MethodPost {
|
||||
@@ -65,6 +67,8 @@ ON CONFLICT(project,workspace_id,material_id,account_id) DO UPDATE SET role=EXCL
|
||||
reply(w, 204, nil)
|
||||
return nil
|
||||
}
|
||||
|
||||
// deleteMaterialGrant 幂等撤销目标账户的素材授权;不存在也返回 204,工作区成员权限不受此操作影响。
|
||||
func (s *service) deleteMaterialGrant(w http.ResponseWriter, r *http.Request, project, account string) error {
|
||||
if r.Method != http.MethodDelete {
|
||||
reject(w, 405, "method_not_allowed")
|
||||
|
||||
Reference in New Issue
Block a user