feat: tmp user only write, no read

This commit is contained in:
2022-03-27 23:52:59 +08:00
parent 4ed92568d8
commit dd3c208fe1
7 changed files with 30 additions and 6 deletions

View File

@@ -92,6 +92,7 @@ pub enum PolicyError {
IsDeleted,
NotAllowed,
TitleUsed,
YouAreTmp,
}
#[derive(Debug)]
@@ -121,6 +122,7 @@ impl<'r> Responder<'r, 'static> for APIError {
PolicyError::IsDeleted => "内容被删除",
PolicyError::NotAllowed => "不允许的操作",
PolicyError::TitleUsed => "头衔已被使用",
PolicyError::YouAreTmp => "临时用户只可发布内容和进入单个洞"
}
})
.respond_to(req),