Class RighterContext
-
- All Implemented Interfaces:
public class RighterContextIn the Controller layer through the interceptor to prevent data privilege elevation. The principle is who create and who destroy, audit data will respond in the form of header. When requesting edits, set allow, and when submitting changes, check and audit.- Since:
2021-03-27
trydofor
-
-
Constructor Summary
Constructors Constructor Description RighterContext()
-
Method Summary
Modifier and Type Method Description static voidsetAllow(Object obj)Set the `allow` items. static voidfunAllow(Consumer<Object> fun)Set the `allow` items. static voiddelAllow()Delete the `allow` items. static <R> RgetAudit(boolean nonnull)Get the `audit` items. static voidsetAudit(Object json)Get the `audit` items. static voiddelAudit()Delete the `audit` items. -
-
Method Detail
-
setAllow
static void setAllow(Object obj)
Set the `allow` items. Used in the controller, before response
-
delAllow
static void delAllow()
Delete the `allow` items. Used in the interceptor.
-
getAudit
@Contract(value = "true ->!null") static <R> R getAudit(boolean nonnull)
Get the `audit` items. Used in the controller, before business
-
delAudit
static void delAudit()
Delete the `audit` items. Used in the interceptor.
-
-
-
-