aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-15 20:54:33 +0800
committerGitHub <noreply@github.com>2020-11-15 20:54:33 +0800
commitdbc05b79c94894b25cbbb23025ed91dd1cf8a7a3 (patch)
tree7c2c792c141def97603cb43d98e83d29ac718e9a /BackEnd/Timeline/Models/Http
parent63ec1050dd24e4123f73e9ed757376dc8128803d (diff)
parent1bbc60966cea77ec6ed7895bea1a01ad9c090c3a (diff)
downloadtimeline-dbc05b79c94894b25cbbb23025ed91dd1cf8a7a3.tar.gz
timeline-dbc05b79c94894b25cbbb23025ed91dd1cf8a7a3.tar.bz2
timeline-dbc05b79c94894b25cbbb23025ed91dd1cf8a7a3.zip
Merge pull request #188 from crupest/root-user
Forbid some operation on root user.
Diffstat (limited to 'BackEnd/Timeline/Models/Http')
-rw-r--r--BackEnd/Timeline/Models/Http/ErrorResponse.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Http/ErrorResponse.cs b/BackEnd/Timeline/Models/Http/ErrorResponse.cs
index ac86481f..10755fd1 100644
--- a/BackEnd/Timeline/Models/Http/ErrorResponse.cs
+++ b/BackEnd/Timeline/Models/Http/ErrorResponse.cs
@@ -156,6 +156,26 @@ namespace Timeline.Models.Http
return new CommonResponse(ErrorCodes.UserController.ChangePassword_BadOldPassword, string.Format(message, formatArgs));
}
+ public static CommonResponse ChangePermission_RootUser(params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.UserController.ChangePermission_RootUser, string.Format(UserController_ChangePermission_RootUser, formatArgs));
+ }
+
+ public static CommonResponse CustomMessage_ChangePermission_RootUser(string message, params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.UserController.ChangePermission_RootUser, string.Format(message, formatArgs));
+ }
+
+ public static CommonResponse Delete_RootUser(params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.UserController.Delete_RootUser, string.Format(UserController_Delete_RootUser, formatArgs));
+ }
+
+ public static CommonResponse CustomMessage_Delete_RootUser(string message, params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.UserController.Delete_RootUser, string.Format(message, formatArgs));
+ }
+
}
public static class UserAvatar